Merge pull request #2114 from rtfeldman/joshuawarner32/fix-det-indentation

Fix indentation within parens
This commit is contained in:
Richard Feldman 2021-12-01 19:38:07 -05:00 committed by GitHub
commit ed40a8fc1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View file

@ -139,7 +139,12 @@ impl<'a> Formattable<'a> for Expr<'a> {
sub_expr.format_with_options(buf, Parens::NotNeeded, Newlines::Yes, indent);
} else {
buf.push('(');
sub_expr.format_with_options(buf, Parens::NotNeeded, Newlines::Yes, indent);
sub_expr.format_with_options(
buf,
Parens::NotNeeded,
Newlines::Yes,
indent + INDENT,
);
buf.push(')');
}
}