Revert "Special-case records, lists, functions in def fmt"

This reverts commit c0b4ceea9b1d817c923eb82fa3ff7a36db90199f.
This commit is contained in:
Richard Feldman 2022-07-13 22:31:08 -04:00
parent 2be68189b4
commit fa877e4184
No known key found for this signature in database
GPG key ID: 7E4127D1E4241798

View file

@ -348,19 +348,6 @@ pub fn fmt_body<'a, 'buf>(
);
}
}
Expr::Record { .. } | Expr::List { .. } | Expr::Closure(_, _) => {
if body.is_multiline() {
buf.spaces(1);
body.format_with_options(buf, Parens::NotNeeded, Newlines::Yes, indent);
} else {
body.format_with_options(
buf,
Parens::NotNeeded,
Newlines::Yes,
indent + INDENT,
);
}
}
Expr::BinOps(_, _) => {
// Binop chains always get a newline. Otherwise you can have things like:
//