3 #![warn(clippy::iter_nth_zero)]
4 use std::collections::HashSet;
9 fn nth(&self, index: usize) -> usize {
16 f.nth(0); // lint does not apply here
18 let mut s = HashSet::new();
20 let _x = s.iter().next();
22 let mut s2 = HashSet::new();
24 let mut iter = s2.iter();
27 let mut s3 = HashSet::new();
29 let mut iter2 = s3.iter();
30 let _unwrapped = iter2.next().unwrap();