#![feature(custom_inner_attributes)]
#![warn(clippy::manual_split_once)]
-#![allow(clippy::iter_skip_next, clippy::iter_nth_zero)]
+#![allow(clippy::iter_skip_next, clippy::iter_nth_zero, clippy::needless_splitn)]
extern crate itertools;
// Don't lint, slices don't have `split_once`
let _ = [0, 1, 2].splitn(2, |&x| x == 1).nth(1).unwrap();
+
+ // `rsplitn` gives the results in the reverse order of `rsplit_once`
+ let _ = "key=value".rsplitn(2, '=').next().unwrap();
+ let _ = "key=value".rsplitn(2, '=').nth(1).unwrap();
+ let _ = "key=value".rsplitn(2, '=').nth(0);
+ let (_, _) = "key=value".rsplitn(2, '=').next_tuple().unwrap();
}
fn _msrv_1_51() {