Note: this is inefficient anyway, don't do it in the first place. but just saying you wanted to: to go from `Vec` to `Vec>`, instead of this: let thenewvec: Vec> = thevec.iter().map(|&x| Rc::new(x)).collect(); do this: let thenewvec: Vec> = thevec.into_iter().map(|x| Rc::new(x)).collect();