2024-02-16 20:02:50 +00:00
|
|
|
//@ check-pass
|
2019-09-22 17:24:09 +12:00
|
|
|
struct Foo<const D: usize> {
|
|
|
|
|
state: Option<[u8; D]>,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<const D: usize> Iterator for Foo<{D}> {
|
|
|
|
|
type Item = [u8; D];
|
|
|
|
|
fn next(&mut self) -> Option<Self::Item> {
|
|
|
|
|
if true {
|
|
|
|
|
return Some(self.state.unwrap().clone());
|
|
|
|
|
} else {
|
|
|
|
|
return Some(self.state.unwrap().clone());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|