into_iter() on vec

This commit is contained in:
Vincent Batts 2023-01-23 11:14:33 -05:00
parent 6eb958eb56
commit 0e3e60b23e
45 changed files with 2 additions and 2 deletions

View File

@ -1,9 +1,9 @@
fn main() {
let v: Vec<i8> = vec![10, 20, 30];
let mut iter = v.iter();
let mut iter = v.into_iter();
println!("v[0]: {:?}", iter.next());
let v1: Option<&i8> = iter.next();
let v1: Option<i8> = iter.next();
println!("v[1]: {v1:?}");
}

Binary file not shown.