What is the idiomatic way to write a for loop without using the iterator value? September 8, 2023 by Tarik You can write _ as your pattern, meaning “discard the value”: let mut x: i32 = 0; for _ in 1..10 { x += 1; }