Assuming I want a finite loop using a range:
let mut x: i32 = 0;
for i in 1..10 {
x += 1;
}
The compiler will spit out the warning:
warning: unused variable: `i`, #[warn(unused_variables)] on by default
for i in 1..10 {
^
Is there a more idiomatic way to write this that won't make the compiler complain?