use crate::ArrayIterator;
pub struct Zip<A, B> {
a: A,
b: B,
}
impl<A, B> Zip<A, B> {
pub fn new(a: A, b: B) -> Self {
Self { a, b }
}
}
impl<A, B, const N: usize> ArrayIterator<N> for Zip<A, B>
where
A: ArrayIterator<N>,
B: ArrayIterator<N>,
{
type Item = (A::Item, B::Item);
unsafe fn next(&mut self) -> Self::Item {
(self.a.next(), self.b.next())
}
}