Remove parentheses from unapplied tags

This commit is contained in:
Chelsea Troy 2021-10-11 20:42:07 -05:00
parent 52ac6063ca
commit 051b511d87
2 changed files with 17 additions and 7 deletions

View file

@ -199,7 +199,7 @@ impl<'a> Formattable<'a> for Expr<'a> {
buf.push_str(name);
}
Apply(loc_expr, loc_args, _) => {
if apply_needs_parens {
if apply_needs_parens && !loc_args.is_empty() {
buf.push('(');
}
@ -221,7 +221,7 @@ impl<'a> Formattable<'a> for Expr<'a> {
}
}
if apply_needs_parens {
if apply_needs_parens && !loc_args.is_empty() {
buf.push(')');
}
}