fixed indentation for apply args

This commit is contained in:
Anton-4 2022-03-07 16:23:15 +01:00
parent 454933e2c6
commit 21a30b1e83
No known key found for this signature in database
GPG key ID: C954D6E0F9C0ABFD
5 changed files with 56 additions and 38 deletions

View file

@ -469,7 +469,13 @@ fn fmt_bin_ops<'a, 'buf>(
buf.spaces(1);
}
loc_right_side.format_with_options(buf, apply_needs_parens, Newlines::Yes, indent);
let next_indent = if is_multiline {
indent + INDENT
} else {
indent
};
loc_right_side.format_with_options(buf, apply_needs_parens, Newlines::Yes, next_indent);
}
fn empty_line_before_expr<'a>(expr: &'a Expr<'a>) -> bool {