Searched refs:exactly_one (Results 1 – 6 of 6) sorted by relevance
249 fn exactly_one() { in exactly_one() function250 assert_eq!((0..10).filter(|&x| x == 2).exactly_one().unwrap(), 2); in exactly_one()251 assert!((0..10).filter(|&x| x > 1 && x < 4).exactly_one().unwrap_err().eq(2..4)); in exactly_one()252 assert!((0..10).filter(|&x| x > 1 && x < 5).exactly_one().unwrap_err().eq(2..5)); in exactly_one()253 assert!((0..10).filter(|&_| false).exactly_one().unwrap_err().eq(0..0)); in exactly_one()
1047 [].iter().exactly_one()?; in exactly_one_question_mark_return()
1192 let ret = a.iter().cloned().exactly_one();
605 struct exactly_one {613 struct exactly_one<P, Default> { using type = Default; };616 using exactly_one_t = typename exactly_one<Predicate, Default, Ts...>::type;
18 …- Added a [`.exactly_one()`](https://docs.rs/itertools/0.8.1/itertools/trait.Itertools.html#method…
2997 fn exactly_one(mut self) -> Result<Self::Item, ExactlyOneError<Self>> in exactly_one() method