What does it mean to pass in a vector into a `for` loop versus a reference to a vector?
The argument to a for loop must implement IntoIterator. If you check out the docs for Vec, you will see these two implementations of IntoIterator: impl<T> IntoIterator for Vec<T> { type Item = T; type IntoIter = IntoIter<T> } impl<‘a, T> IntoIterator for &’a Vec<T> { type Item = &’a T; type IntoIter = Iter<‘a, … Read more