]> git.proxmox.com Git - rustc.git/blob - 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
1 ### What it does
2 Checks for loops on `y.into_iter()` where `y` will do, and
3 suggests the latter.
4
5 ### Why is this bad?
6 Readability.
7
8 ### Example
9 ```
10 // with `y` a `Vec` or slice:
11 for x in y.into_iter() {
12 // ..
13 }
14 ```
15 can be rewritten to
16 ```
17 for x in y {
18 // ..
19 }
20 ```