]> git.lizzy.rs Git - rust.git/blob - tests/source/issue-4577.rs
Prevent duplicate comma when formatting struct pattern with ".."
[rust.git] / 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 }