This commit is contained in:
Anthony Bullard 2024-12-31 22:13:24 -06:00
parent 8c77a54b4f
commit 2bb3b84ce7
No known key found for this signature in database

View file

@ -96,7 +96,7 @@ fn format_expr_only(
}
Expr::Apply(loc_expr, loc_args, _) => {
let apply_needs_parens = parens == Parens::InApply || parens == Parens::InApplyLastArg;
if buf.flags().parens_and_commas || !(apply_needs_parens && !loc_args.is_empty()) {
if buf.flags().parens_and_commas || !apply_needs_parens || loc_args.is_empty() {
fmt_apply(loc_expr, loc_args, indent, buf, false);
} else {
fmt_parens(item, buf, indent);