fix: don't insert trailing comma on struct lit rest in mac def

This commit is contained in:
Caleb Cartwright 2021-01-28 19:14:44 -06:00 committed by Caleb Cartwright
parent d80a42fdd8
commit b8f318c303

View File

@ -1629,7 +1629,10 @@ fn rewrite_struct_lit<'a>(
nested_shape,
tactic,
context,
force_no_trailing_comma || has_base || !context.use_block_indent(),
force_no_trailing_comma
|| has_base
|| !context.use_block_indent()
|| matches!(struct_rest, ast::StructRest::Rest(_)),
);
write_list(&item_vec, &fmt)?