Implement DoubleEndedIterator for TinyVecIterator (#145)

This commit is contained in:
Ole Bertram
2021-07-13 14:49:17 +02:00
committed by GitHub
parent a2933e4c6d
commit 11b308804e
+13
View File
@@ -1190,6 +1190,19 @@ impl<A: Array> Iterator for TinyVecIterator<A> {
}
}
impl<A: Array> DoubleEndedIterator for TinyVecIterator<A> {
impl_mirrored! {
type Mirror = TinyVecIterator;
#[inline]
fn next_back(self: &mut Self) -> Option<Self::Item>;
#[cfg(feature = "rustc_1_40")]
#[inline]
fn nth_back(self: &mut Self, n: usize) -> Option<Self::Item>;
}
}
impl<A: Array> Debug for TinyVecIterator<A>
where
A::Item: Debug,