]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/iter_skip_next_unfixable.stderr
Auto merge of #99497 - vladimir-ea:stdlib_os_api_watchos, r=thomcc
[rust.git] / src / tools / clippy / tests / ui / iter_skip_next_unfixable.stderr
1 error: called `skip(..).next()` on an iterator
2   --> $DIR/iter_skip_next_unfixable.rs:9:26
3    |
4 LL |     let _: Vec<&str> = sp.skip(1).next().unwrap().split(' ').collect();
5    |                          ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)`
6    |
7 help: for this change `sp` has to be mutable
8   --> $DIR/iter_skip_next_unfixable.rs:8:9
9    |
10 LL |     let sp = test_string.split('|').map(|s| s.trim());
11    |         ^^
12    = note: `-D clippy::iter-skip-next` implied by `-D warnings`
13
14 error: called `skip(..).next()` on an iterator
15   --> $DIR/iter_skip_next_unfixable.rs:11:29
16    |
17 LL |         let _: Vec<&str> = s.skip(1).next().unwrap().split(' ').collect();
18    |                             ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)`
19    |
20 help: for this change `s` has to be mutable
21   --> $DIR/iter_skip_next_unfixable.rs:10:17
22    |
23 LL |     if let Some(s) = Some(test_string.split('|').map(|s| s.trim())) {
24    |                 ^
25
26 error: called `skip(..).next()` on an iterator
27   --> $DIR/iter_skip_next_unfixable.rs:17:29
28    |
29 LL |         let _: Vec<&str> = s.skip(1).next().unwrap().split(' ').collect();
30    |                             ^^^^^^^^^^^^^^^ help: use `nth` instead: `.nth(1)`
31    |
32 help: for this change `s` has to be mutable
33   --> $DIR/iter_skip_next_unfixable.rs:13:17
34    |
35 LL |     fn check<T>(s: T)
36    |                 ^
37
38 error: aborting due to 3 previous errors
39