Support '??' syntax for optional record fields

This commit is contained in:
Anthony Bullard 2025-01-04 14:26:20 -06:00
parent 3d4dd5b583
commit a24fe430b4
No known key found for this signature in database
21 changed files with 42 additions and 43 deletions

View file

@ -701,16 +701,8 @@ fn fmt_apply(
if !expr.before.is_empty() {
format_spaces(buf, expr.before, Newlines::Yes, indent);
}
expr.item.format_with_options(
buf,
if use_commas_and_parens {
Parens::NotNeeded
} else {
Parens::InApply
},
Newlines::Yes,
indent,
);
expr.item
.format_with_options(buf, Parens::InApply, Newlines::Yes, indent);
if use_commas_and_parens {
buf.push('(');