summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/configs/force_multiline_block/true.rs
blob: aec50afe5a840611499c19cb910943fe30f82bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// rustfmt-force_multiline_blocks: true
// Option forces multiline match arm and closure bodies to be wrapped in a block

fn main() {
    match lorem {
        Lorem::Ipsum => {
            if ipsum {
                println!("dolor");
            }
        }
        Lorem::Dolor => println!("amet"),
    }
}

fn main() {
    result.and_then(|maybe_value| {
        match maybe_value {
            None => Err("oops"),
            Some(value) => Ok(1),
        }
    });
}