mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 11:44:28 +00:00
411c73c12f
multiline_closure_forces_block = false (default): result.and_then(|maybe_value| match maybe_value { None => ..., Some(value) => ..., }) multiline_closure_forces_block = true: result.and_then(|maybe_value| { match maybe_value { None => ..., Some(value) => ..., } }) multiline_match_arm_forces_block = false (default): match lorem { None => if ipsum { println!("Hello World"); }, Some(dolor) => ..., } multiline_match_arm_forces_block = true: match lorem { None => { if ipsum { println!("Hello World"); } } Some(dolor) => ..., }
12 lines
278 B
Rust
12 lines
278 B
Rust
// rustfmt-multiline_match_arm_forces_block: false
|
|
// Option forces multiline match arm bodies to be wrapped in a block
|
|
|
|
fn main() {
|
|
match lorem {
|
|
Lorem::Ipsum => if ipsum {
|
|
println!("dolor");
|
|
},
|
|
Lorem::Dolor => println!("amet"),
|
|
}
|
|
}
|