ospf_rust_base/
iter.rs

1pub trait None: Iterator {
2    fn none<F>(&mut self, f: F) -> bool
3    where
4        Self: Sized,
5        F: FnMut(<Self as Iterator>::Item) -> bool;
6}
7
8impl<T: Sized + Iterator> None for T {
9    fn none<F>(&mut self, mut f: F) -> bool
10    where
11        F: FnMut(<Self as Iterator>::Item) -> bool
12    {
13        self.all(|x| !f(x))
14    }
15}