Skip to content

Commit b8f318c

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

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/expr.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,10 @@ fn rewrite_struct_lit<'a>(
16291629
nested_shape,
16301630
tactic,
16311631
context,
1632-
force_no_trailing_comma || has_base || !context.use_block_indent(),
1632+
force_no_trailing_comma
1633+
|| has_base
1634+
|| !context.use_block_indent()
1635+
|| matches!(struct_rest, ast::StructRest::Rest(_)),
16331636
);
16341637

16351638
write_list(&item_vec, &fmt)?

0 commit comments

Comments
 (0)