Fix outdenting in closures

This commit is contained in:
Joshua Warner 2024-12-14 20:28:46 -08:00
parent 54a0456c30
commit 7b9aa59d64
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 63 additions and 1 deletions

View file

@ -1872,7 +1872,6 @@ fn fmt_closure<'a>(
};
if should_outdent {
buf.spaces(1);
sub_expr.format_with_options(buf, Parens::NotNeeded, Newlines::Yes, indent);
} else {
loc_ret.format_with_options(buf, Parens::NotNeeded, Newlines::Yes, body_indent);