summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/explicit_into_iter_loop.txt
blob: 3931dfd69a318d74f9112bd2ea4b7baff6757b7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
### What it does
Checks for loops on `y.into_iter()` where `y` will do, and
suggests the latter.

### Why is this bad?
Readability.

### Example
```
// with `y` a `Vec` or slice:
for x in y.into_iter() {
    // ..
}
```
can be rewritten to
```
for x in y {
    // ..
}
```