feat(tvix/eval): impl DoubleEndedIter for OwnedAttrsIterator

Change-Id: I4bd85dbe9c27047f4abbdeff4e2b796e9bcab3a1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10211
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: Adam Joseph <adam@westernsemico.com>
Tested-by: BuildkiteCI
This commit is contained in:
Adam Joseph 2023-12-08 01:41:22 -08:00 committed by clbot
parent 36c3e646e1
commit 5fd42a9e70

View file

@ -615,3 +615,13 @@ impl ExactSizeIterator for OwnedAttrsIterator {
}
}
}
impl DoubleEndedIterator for OwnedAttrsIterator {
fn next_back(&mut self) -> Option<Self::Item> {
match &mut self.0 {
IntoIterRepr::Empty => None,
IntoIterRepr::Finite(inner) => inner.next_back(),
IntoIterRepr::Im(inner) => inner.next_back(),
}
}
}