forked from rust-lang/rust-clippy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiter_skip_next.stderr
35 lines (30 loc) · 1.11 KB
/
iter_skip_next.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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