Address PR comments, add syntax tests

This commit is contained in:
Sam Mohr 2024-10-21 03:06:43 -07:00
parent b3e60f9d3a
commit 7518a2c5ab
No known key found for this signature in database
GPG key ID: EA41D161A3C1BC99
28 changed files with 772 additions and 34 deletions

View file

@ -1085,7 +1085,13 @@ fn fmt_return<'a>(
buf.spaces(1);
return_value.format(buf, indent);
let return_indent = if return_value.is_multiline() {
indent + INDENT
} else {
indent
};
return_value.format(buf, return_indent);
if let Some(after_return) = after_return {
after_return.format_with_options(buf, parens, newlines, indent);