("{}", i); v.push(4);我想在不传递该向量的所有权的情况下,在子函数中变异一个向量。子函数需要迭代向量并对其进行变异。| - | `v` moved due to this implicit call to `.into_iterhelp: consider borrowing to avoid moving into the for loop: `&v`14 | v
[4, 5, 6];
// `into_iter()` for vecs yields `i32`.let mut into_iter = vec2.into_iter();
// `iter()` for vecs yields `&i32`, and we want to reference, iter
because `iterator` has type `std::slice::Iter<'_, i32>`, which does not implement the `Copy` trait | -------- `iterator` moved due to this implicit call to `.into_iter|
note: this function takes ownership of the receiver `self`, whi