- Name: (fill me in:
name-of-design
)
- Proposed by: [@name](link to github profile)
- Original proposal (optional): (url)
#![allow(unused)]
fn main() {
/// A trimmed-down version of the `std::Iterator` trait.
pub trait Iterator {
type Item;
fn next(&mut self) -> Option<Self::Item>;
fn size_hint(&self) -> (usize, Option<usize>);
}
/// An adaptation of `Iterator::find` to a free-function
pub fn find<I, T, P>(iter: &mut I, predicate: P) -> Option<T>
where
I: Iterator<Item = T> + Sized,
P: FnMut(&T) -> bool;
}
#![allow(unused)]
fn main() {
// fill me in
}
#![allow(unused)]
fn main() {
// fill me in
}
#![allow(unused)]
fn main() {
// fill me in
}