2021-12-30 14:10:43 +00:00
|
|
|
error: called `skip(..).next()` on an iterator
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/iter_skip_next_unfixable.rs:9:26
|
2021-12-30 14:10:43 +00:00
|
|
|
|
|
|
|
|
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
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/iter_skip_next_unfixable.rs:8:9
|
2021-12-30 14:10:43 +00:00
|
|
|
|
|
|
|
|
LL | let sp = test_string.split('|').map(|s| s.trim());
|
|
|
|
| ^^
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::iter-skip-next` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::iter_skip_next)]`
|
2021-12-30 14:10:43 +00:00
|
|
|
|
|
|
|
error: called `skip(..).next()` on an iterator
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/iter_skip_next_unfixable.rs:12:29
|
2021-12-30 14:10:43 +00:00
|
|
|
|
|
|
|
|
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
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/iter_skip_next_unfixable.rs:11:17
|
2021-12-30 14:10:43 +00:00
|
|
|
|
|
|
|
|
LL | if let Some(s) = Some(test_string.split('|').map(|s| s.trim())) {
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: called `skip(..).next()` on an iterator
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/iter_skip_next_unfixable.rs:19:29
|
2021-12-30 14:10:43 +00:00
|
|
|
|
|
|
|
|
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
|
2024-02-27 14:25:18 +00:00
|
|
|
--> tests/ui/iter_skip_next_unfixable.rs:15:17
|
2021-12-30 14:10:43 +00:00
|
|
|
|
|
|
|
|
LL | fn check<T>(s: T)
|
|
|
|
| ^
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|