In Rust you can write a foreach loop like this:
(0..arr.len()).for_each(|i| { // parens
println!("Item: {}", arr[i]);
})
or like this:
{ 0..arr.len() }.for_each(|i| { // braces
println!("Item: {}", arr[i]);
})
I know this isn't the smartest question, but which is correct? Which is the better practice?