Skip to content

Commit 5762933

Browse files
fix: don't insert trailing comma on struct lit rest in mac def
1 parent 316c666 commit 5762933

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/formatting/expr.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1654,7 +1654,10 @@ fn rewrite_struct_lit<'a>(
16541654
nested_shape,
16551655
tactic,
16561656
context,
1657-
force_no_trailing_comma || has_base || !context.use_block_indent(),
1657+
force_no_trailing_comma
1658+
|| has_base
1659+
|| !context.use_block_indent()
1660+
|| matches!(struct_rest, ast::StructRest::Rest(_)),
16581661
);
16591662

16601663
write_list(&item_vec, &fmt)?

0 commit comments

Comments
 (0)