fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1#[allow(clippy::string_add, unused)] 2#[warn(clippy::string_add_assign)] 3fn main() { 4 // ignores assignment distinction 5 let mut x = String::new(); 6 7 for _ in 1..3 { 8 x += "."; 9 } 10 11 let y = String::new(); 12 let z = y + "..."; 13 14 assert_eq!(&x, &z); 15 16 let mut x = 1; 17 x += 1; 18 assert_eq!(2, x); 19}