]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/src/docs/explicit_into_iter_loop.txt
New upstream version 1.66.0+dfsg1
[rustc.git] / src / tools / clippy / src / docs / explicit_into_iter_loop.txt
CommitLineData
f2b60f7d
FG
1### What it does
2Checks for loops on `y.into_iter()` where `y` will do, and
3suggests the latter.
4
5### Why is this bad?
6Readability.
7
8### Example
9```
10// with `y` a `Vec` or slice:
11for x in y.into_iter() {
12 // ..
13}
14```
15can be rewritten to
16```
17for x in y {
18 // ..
19}
20```