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:
Shaurya Arora authored and GitHub committed 2023-07-23 21:02:20 -07:00
1 parent c0e79596d4
commit f1058980e4
1 file changed
+1 -1
+1 -1
View File
@@ -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.