summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/issue-2985.rs
blob: bde4da8314c13f880b91bb92a815cae891c60245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// rustfmt-indent_style: Visual
fn foo() {
    {
        {
            let extra_encoder_settings = extra_encoder_settings.iter()
                                                               .filter_map(|&(name, value)| {
                                                         value.split()
                                                              .next()
                                                              .something()
                                                              .something2()
                                                              .something3()
                                                              .something4()
                                                     });
            let extra_encoder_settings = extra_encoder_settings.iter()
                                                               .filter_map(|&(name, value)| {
                                                                               value.split()
                                                                                    .next()
                                                                                    .something()
                                                                                    .something2()
                                                                                    .something3()
                                                                                    .something4()
                                                                           })
                                                               .something();
            if let Some(subpod) = pod.subpods.iter().find(|s| {
                                                              !s.plaintext
                                                                .as_ref()
                                                                .map(String::as_ref)
                                                                .unwrap_or("")
                                                                .is_empty()
                                                          }) {
                do_something();
            }
        }
    }
}