1 #![warn(clippy::iter_skip_next)]
4 /// Checks implementation of `ITER_SKIP_NEXT` lint
7 let test_string = "1|1 2";
8 let sp = test_string.split('|').map(|s| s.trim());
9 let _: Vec<&str> = sp.skip(1).next().unwrap().split(' ').collect();
10 if let Some(s) = Some(test_string.split('|').map(|s| s.trim())) {
11 let _: Vec<&str> = s.skip(1).next().unwrap().split(' ').collect();
15 T: Iterator<Item = String>,
17 let _: Vec<&str> = s.skip(1).next().unwrap().split(' ').collect();