## `wrap_match_arms`
-Wrap multiline match arms in blocks
+Wrap the body of arms in blocks when it does not fit on the same line with the pattern of arms
- **Default value**: `true`
- **Possible values**: `true`, `false`
```rust
match lorem {
- true => {
- let ipsum = dolor;
- println!("{}", ipsum);
- }
- false => {
- println!("{}", sit)
- }
+ true =>
+ foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
+ false => println!("{}", sit),
}
```
```rust
match lorem {
true => {
- let ipsum = dolor;
- println!("{}", ipsum);
+ foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
}
false => println!("{}", sit),
}
wrap_comments: bool, false, "Break comments to fit on the line";
comment_width: usize, 80, "Maximum length of comments. No effect unless wrap_comments = true";
normalize_comments: bool, false, "Convert /* */ comments to // comments where possible";
- wrap_match_arms: bool, true, "Wrap multiline match arms in blocks";
+ wrap_match_arms: bool, true, "Wrap the body of arms in blocks when it does not fit on \
+ the same line with the pattern of arms";
match_block_trailing_comma: bool, false,
"Put a trailing comma after a block based match arm (non-block arms are not affected)";
indent_match_arms: bool, true, "Indent match arms instead of keeping them at the same \
fn main() {
match lorem {
- true => {
- let ipsum = dolor;
- println!("{:?}", ipsum);
- }
+ true => foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
false => {
println!("{}", sit)
}
fn main() {
match lorem {
- true => {
- let ipsum = dolor;
- println!("{}", ipsum);
- }
+ true => foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
false => {
println!("{}", sit)
}
fn main() {
match lorem {
- true => {
- let ipsum = dolor;
- println!("{:?}", ipsum);
- }
- false => {
- println!("{}", sit)
- }
+ true =>
+ foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x),
+ false => println!("{}", sit),
}
}
fn main() {
match lorem {
true => {
- let ipsum = dolor;
- println!("{}", ipsum);
+ foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(x)
}
false => println!("{}", sit),
}
fn foo() {
match x {
- a => {
- foo()
- }
+ a => foo(),
b => (
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb,