into_iter() on vec
This commit is contained in:
parent
6eb958eb56
commit
0e3e60b23e
45 changed files with 2 additions and 2 deletions
|
@ -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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue