Skip to content

Commit

Permalink
fix: don't insert trailing comma on struct lit rest in mac def
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcartwright committed Jan 29, 2021
1 parent d80a42f commit b8f318c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?
Expand Down

0 comments on commit b8f318c

Please sign in to comment.