mirror of
https://gitee.com/openharmony/third_party_rust_either
synced 2024-11-23 06:59:40 +00:00
parent
23a36c1996
commit
643508cfc1
11
src/lib.rs
11
src/lib.rs
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user