rust array find index of element code example
Example: rust get items in a list with index and value
for (i, x) in items.iter().enumerate() {
println!("Item {} = {}", i, x);
}
for (i, x) in items.iter().enumerate() {
println!("Item {} = {}", i, x);
}