]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/source/issue-4577.rs
Rollup merge of #107166 - petrochenkov:nooptable, r=oli-obk
[rust.git] / src / tools / rustfmt / tests / source / issue-4577.rs
1 fn main() {
2     let s: String = "ABAABBAA".chars()
3         .filter(|c| {
4             if *c == 'A' {
5                 true
6             }
7             else {
8                 false
9             }
10         })
11         .map(|c| -> char {
12         if c == 'A' {
13             '0'
14         } else {
15             '1'
16         }
17     }).collect();
18     
19     println!("{}", s);
20 }