Skip to content
Snippets Groups Projects
Commit 055e1f34 authored by Antonio Caggiano's avatar Antonio Caggiano
Browse files

Fix errors

parent 1e9af620
No related branches found
No related tags found
No related merge requests found
Pipeline #30618 passed
......@@ -166,7 +166,7 @@ Get the _position_ of an element which satisfies a certain condition.
```rust
let v = vec![1, 2, 3, 4, 5];
v.iter().position(|&x| x == 3); // Some(1)
v.iter().position(|&x| x == 3); // Some(2)
v.iter().position(|&x| x == 0); // None
```
......@@ -356,7 +356,7 @@ Look at the next element without advancing.
```rust
let v = vec![1, 2, 3, 4, 5];
let mut iter = v.iter();
let mut iter = v.iter().peekable();
iter.peek(); // Some(&&1)
iter.next(); // Some(&1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment