mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
18 lines
298 B
Rust
18 lines
298 B
Rust
|
use std::iter::Peekable;
|
||
|
|
||
|
pub struct Span<F: Fn(&i32)> {
|
||
|
inner: Peekable<ConditionalIterator<F>>,
|
||
|
}
|
||
|
|
||
|
struct ConditionalIterator<F> {
|
||
|
f: F,
|
||
|
}
|
||
|
|
||
|
impl<F: Fn(&i32)> Iterator for ConditionalIterator<F> {
|
||
|
type Item = ();
|
||
|
|
||
|
fn next(&mut self) -> Option<Self::Item> {
|
||
|
todo!()
|
||
|
}
|
||
|
}
|