|
@ -23,9 +23,8 @@ pub struct MovePatIt<'a> { |
|
|
impl Iterator for MovePatIt<'_> { |
|
|
impl Iterator for MovePatIt<'_> { |
|
|
type Item = MovePattern; |
|
|
type Item = MovePattern; |
|
|
fn next(&mut self) -> Option<Self::Item> { |
|
|
fn next(&mut self) -> Option<Self::Item> { |
|
|
match self.cache.pop() { |
|
|
if let Some(x) = self.cache.pop() { |
|
|
Some(x) => return Some(x), |
|
|
return Some(x); |
|
|
None => (), |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let k = self.iter.next()?; |
|
|
let k = self.iter.next()?; |
|
@ -59,7 +58,7 @@ impl Iterator for MovePatIt<'_> { |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return Some(*k); |
|
|
Some(*k) |
|
|
} |
|
|
} |
|
|
} //if naive sucks
|
|
|
} //if naive sucks
|
|
|
|
|
|
|
|
|