I am struggling to write a function that takes a vector of vectors, and modifies the inner vectors in place.
My non-compiling function - I've removed my previous failed efforts at trying to make the right things mutable, as they were not helping - hopefully the wrong code makes simple what I'm trying to do.
pub fn test_vec(V : Vec<Vec<char>>) {
let from_vec = V.get(0).unwrap();
let to_vec = V.get(1).unwrap();
let ch = from_vec.pop().unwrap();
to_vec.push(ch);
}
Very grateful for any ideas - it has me stumped!
Thanks,
Wes