Trailing commas for match block arms
Attempt to implement an option for trailing commas for block based match arms (issue 173). Put in place test files to verify this behaviour.
This commit is contained in:
parent
36d65e4538
commit
2a430a8947
4 changed files with 36 additions and 5 deletions
13
tests/source/match-block-trailing-comma.rs
Normal file
13
tests/source/match-block-trailing-comma.rs
Normal file
|
@ -0,0 +1,13 @@
|
|||
// rustfmt-match_block_trailing_comma: true
|
||||
// Match expressions, no unwrapping of block arms or wrapping of multiline
|
||||
// expressions.
|
||||
|
||||
fn foo() {
|
||||
match x {
|
||||
a => {
|
||||
"line1";
|
||||
"line2"
|
||||
}
|
||||
b => "bar",
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue