mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-18 02:38:28 +00:00
28 lines
889 B
Text
28 lines
889 B
Text
error: using `.iter().next()` on an array
|
|
--> $DIR/iter_next_slice.rs:9:13
|
|
|
|
|
LL | let _ = s.iter().next();
|
|
| ^^^^^^^^^^^^^^^ help: try calling: `s.get(0)`
|
|
|
|
|
= note: `-D clippy::iter-next-slice` implied by `-D warnings`
|
|
|
|
error: using `.iter().next()` on a Slice without end index
|
|
--> $DIR/iter_next_slice.rs:12:13
|
|
|
|
|
LL | let _ = s[2..].iter().next();
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try calling: `s.get(2)`
|
|
|
|
error: using `.iter().next()` on a Slice without end index
|
|
--> $DIR/iter_next_slice.rs:15:13
|
|
|
|
|
LL | let _ = v[5..].iter().next();
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try calling: `v.get(5)`
|
|
|
|
error: using `.iter().next()` on an array
|
|
--> $DIR/iter_next_slice.rs:18:13
|
|
|
|
|
LL | let _ = v.iter().next();
|
|
| ^^^^^^^^^^^^^^^ help: try calling: `v.get(0)`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|