summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-4577.rs
blob: 1bd9eb6b806083808c7a07627057cce94ea7ea2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
fn main() {
    let s: String = "ABAABBAA"
        .chars()
        .filter(|c| if *c == 'A' { true } else { false })
        .map(|c| -> char {
            if c == 'A' {
                '0'
            } else {
                '1'
            }
        })
        .collect();

    println!("{}", s);
}