mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-05 16:36:19 +02:00
Update while-let-expressions.md (#1018)
Update code snippet description to use `v.into_iter()` instead of `v.iter()` since the former is what's actually used in the code snippet.
This commit is contained in:
parent
c0e79596d4
commit
f1058980e4
@ -14,7 +14,7 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
Here the iterator returned by `v.iter()` will return a `Option<i32>` on every
|
||||
Here the iterator returned by `v.into_iter()` will return a `Option<i32>` on every
|
||||
call to `next()`. It returns `Some(x)` until it is done, after which it will
|
||||
return `None`. The `while let` lets us keep iterating through all items.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user