|
1 | 1 | error: using `.iter().next()` on an array
|
2 |
| - --> $DIR/iter_next_slice.rs:9:5 |
| 2 | + --> $DIR/iter_next_slice.rs:9:13 |
3 | 3 | |
|
4 |
| -LL | s.iter().next(); |
5 |
| - | ^^^^^^^^^^^^^^^ help: try calling: `s.get(0)` |
| 4 | +LL | let _ = s.iter().next(); |
| 5 | + | ^^^^^^^^^^^^^^^ help: try calling: `s.get(0)` |
6 | 6 | |
|
7 | 7 | = note: `-D clippy::iter-next-slice` implied by `-D warnings`
|
8 | 8 |
|
9 | 9 | error: using `.iter().next()` on a Slice without end index
|
10 |
| - --> $DIR/iter_next_slice.rs:12:5 |
| 10 | + --> $DIR/iter_next_slice.rs:12:13 |
11 | 11 | |
|
12 |
| -LL | s[2..].iter().next(); |
13 |
| - | ^^^^^^^^^^^^^^^^^^^^ help: try calling: `s.get(2)` |
| 12 | +LL | let _ = s[2..].iter().next(); |
| 13 | + | ^^^^^^^^^^^^^^^^^^^^ help: try calling: `s.get(2)` |
14 | 14 |
|
15 | 15 | error: using `.iter().next()` on a Slice without end index
|
16 |
| - --> $DIR/iter_next_slice.rs:15:5 |
| 16 | + --> $DIR/iter_next_slice.rs:15:13 |
17 | 17 | |
|
18 |
| -LL | v[5..].iter().next(); |
19 |
| - | ^^^^^^^^^^^^^^^^^^^^ help: try calling: `v.get(5)` |
| 18 | +LL | let _ = v[5..].iter().next(); |
| 19 | + | ^^^^^^^^^^^^^^^^^^^^ help: try calling: `v.get(5)` |
20 | 20 |
|
21 | 21 | error: using `.iter().next()` on an array
|
22 |
| - --> $DIR/iter_next_slice.rs:18:5 |
| 22 | + --> $DIR/iter_next_slice.rs:18:13 |
23 | 23 | |
|
24 |
| -LL | v.iter().next(); |
25 |
| - | ^^^^^^^^^^^^^^^ help: try calling: `v.get(0)` |
| 24 | +LL | let _ = v.iter().next(); |
| 25 | + | ^^^^^^^^^^^^^^^ help: try calling: `v.get(0)` |
26 | 26 |
|
27 | 27 | error: aborting due to 4 previous errors
|
28 | 28 |
|
0 commit comments