Add missing specializations on DoubleEndedIterator impl

Resolves #65
This commit is contained in:
Thomas BESSOU 2022-03-21 17:46:43 +01:00 committed by Josh Stone
parent 23a36c1996
commit 643508cfc1

View File

@ -940,6 +940,17 @@ where
fn next_back(&mut self) -> Option<Self::Item> {
for_both!(*self, ref mut inner => inner.next_back())
}
fn nth_back(&mut self, n: usize) -> Option<Self::Item> {
for_both!(*self, ref mut inner => inner.nth_back(n))
}
fn rfold<Acc, G>(self, init: Acc, f: G) -> Acc
where
G: FnMut(Acc, Self::Item) -> Acc,
{
for_both!(self, inner => inner.rfold(init, f))
}
}
impl<L, R> ExactSizeIterator for Either<L, R>