diff options
-rw-r--r-- | tvix/eval/src/value/attrs.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tvix/eval/src/value/attrs.rs b/tvix/eval/src/value/attrs.rs index 10bdee4eba3a..03183810f24b 100644 --- a/tvix/eval/src/value/attrs.rs +++ b/tvix/eval/src/value/attrs.rs @@ -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(), + } + } +} |