Enumerate over vector uses tuples
examples/tuples/enumerate-vector/src/main.rs
fn main() { #[allow(clippy::useless_vec)] let fruits = vec!["apple", "banana", "peach"]; for (index, name) in fruits.iter().enumerate() { println!("{index}) {name}"); } }
0) apple 1) banana 2) peach