summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/issue-4577.rs
blob: 79975dd73ffc4302fcb3fa0169fd2b65fb306351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
}