Don't add more newlines than necessary

This commit is contained in:
Richard Feldman 2022-07-06 15:07:44 -04:00
parent 87b7a9ba3b
commit 267bae5dec
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798

View file

@ -550,7 +550,7 @@ fn fmt_bin_ops<'a, 'buf>(
loc_left_side.format_with_options(buf, apply_needs_parens, Newlines::No, curr_indent);
if is_multiline {
buf.newline();
buf.ensure_ends_in_newline();
curr_indent = indent + INDENT;
buf.indent(curr_indent);
} else {