https://qiita.com/harvath/items/b79eaf61e73e79e3fc0f
into_iter
2022/2/26 16:17:00
let v1:Vec<String> = vec![String::from("Hoge"), String::from("Fuga"), String::from("Foo")];
//所有権の移動が発生し、v1が使えなくなる
let v2:Vec<String> = v1.into_iter().filter(|x|{x.len() == 3}).collect();
assert_eq!(v1, vec![String::from("Hoge"), String::from("Fuga"), String::from("Foo")]);
assert_eq!(v2, vec![String::from("Foo")]);