mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-15 10:07:30 +00:00
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
error: called `skip(x).next()` on an iterator
|
|
--> $DIR/iter_skip_next.rs:13:13
|
|
|
|
|
LL | let _ = some_vec.iter().skip(42).next();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::iter-skip-next` implied by `-D warnings`
|
|
= help: this is more succinctly expressed by calling `nth(x)`
|
|
|
|
error: called `skip(x).next()` on an iterator
|
|
--> $DIR/iter_skip_next.rs:14:13
|
|
|
|
|
LL | let _ = some_vec.iter().cycle().skip(42).next();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: this is more succinctly expressed by calling `nth(x)`
|
|
|
|
error: called `skip(x).next()` on an iterator
|
|
--> $DIR/iter_skip_next.rs:15:13
|
|
|
|
|
LL | let _ = (1..10).skip(10).next();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: this is more succinctly expressed by calling `nth(x)`
|
|
|
|
error: called `skip(x).next()` on an iterator
|
|
--> $DIR/iter_skip_next.rs:16:14
|
|
|
|
|
LL | let _ = &some_vec[..].iter().skip(3).next();
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
= help: this is more succinctly expressed by calling `nth(x)`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|