]>
Commit | Line | Data |
---|---|---|
f2b60f7d FG |
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 | ``` |