rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

Fix incorrect separator for match arms (#6373)

Open mfarberbrodsky opened this issue 1 year ago • 2 comments

Fixes #6373

The post_comment member of the ListItem corresponding to the first match arm in the test contained the trailing comma, even though it should have been trimmed. The reason it wasn't trimmed is that the separator for the match arms list was pipe | rather than comma ,.

mfarberbrodsky avatar Oct 25 '24 15:10 mfarberbrodsky

Thanks for the PR. Can you add some additional test cases where the match arms aren't separated by commas. For example, when each arm has a block body.

ytmimi avatar Oct 28 '24 01:10 ytmimi

and also some where the arm patterns have leading pipes (with match_arm_leading_pipes configured to add/preserve pipes)

calebcartwright avatar Oct 28 '24 15:10 calebcartwright