]>
Commit | Line | Data |
---|---|---|
f20569fa XL |
1 | error: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent |
2 | --> $DIR/iter_nth_zero.rs:20:14 | |
3 | | | |
4 | LL | let _x = s.iter().nth(0); | |
5 | | ^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `s.iter().next()` | |
6 | | | |
7 | = note: `-D clippy::iter-nth-zero` implied by `-D warnings` | |
8 | ||
9 | error: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent | |
10 | --> $DIR/iter_nth_zero.rs:25:14 | |
11 | | | |
12 | LL | let _y = iter.nth(0); | |
13 | | ^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `iter.next()` | |
14 | ||
15 | error: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent | |
16 | --> $DIR/iter_nth_zero.rs:30:22 | |
17 | | | |
18 | LL | let _unwrapped = iter2.nth(0).unwrap(); | |
19 | | ^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `iter2.next()` | |
20 | ||
21 | error: aborting due to 3 previous errors | |
22 |