How can I do a mutable borrow in a for loop?
You may want to re-read The Rust Programming Language, specifically the sections on: mutability mutable references vectors We can also iterate over mutable references to each element in a mutable vector in order to make changes to all the elements. The for loop in Listing 8-9 will add 50 to each element. let mut v … Read more