Comment Comment by blinkingled > for i in 0..(xs.len()) { let x = xs[i]; // do something with x } > should really be this:> for x in &xs { // do something with x }I am curious why the compiler can't rewrite the former to the latter? parent blinkingled 9 years ago
> for x in &xs { // do something with x }
I am curious why the compiler can't rewrite the former to the latter?