blob: 4062706f94206a9ddc367f64298b877b3225d720 (
plain)
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
35
36
37
38
39
|
error: called `skip(..).next()` on an iterator
--> $DIR/iter_skip_next_unfixable.rs:9:26
|
LL | let _: Vec<&str> = sp.skip(1).next().unwrap().split(' ').collect();
| ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)`
|
help: for this change `sp` has to be mutable
--> $DIR/iter_skip_next_unfixable.rs:8:9
|
LL | let sp = test_string.split('|').map(|s| s.trim());
| ^^
= note: `-D clippy::iter-skip-next` implied by `-D warnings`
error: called `skip(..).next()` on an iterator
--> $DIR/iter_skip_next_unfixable.rs:11:29
|
LL | let _: Vec<&str> = s.skip(1).next().unwrap().split(' ').collect();
| ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)`
|
help: for this change `s` has to be mutable
--> $DIR/iter_skip_next_unfixable.rs:10:17
|
LL | if let Some(s) = Some(test_string.split('|').map(|s| s.trim())) {
| ^
error: called `skip(..).next()` on an iterator
--> $DIR/iter_skip_next_unfixable.rs:17:29
|
LL | let _: Vec<&str> = s.skip(1).next().unwrap().split(' ').collect();
| ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)`
|
help: for this change `s` has to be mutable
--> $DIR/iter_skip_next_unfixable.rs:13:17
|
LL | fn check<T>(s: T)
| ^
error: aborting due to 3 previous errors
|