about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tvix/eval/src/value/attrs.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/eval/src/value/attrs.rs b/tvix/eval/src/value/attrs.rs
index 15a709730c1c..f3638e69c214 100644
--- a/tvix/eval/src/value/attrs.rs
+++ b/tvix/eval/src/value/attrs.rs
@@ -299,6 +299,12 @@ impl NixAttrs {
         })
     }
 
+    /// Same as iter(), but marks call sites which rely on the
+    /// iteration being lexicographic.
+    pub fn iter_sorted<'a>(&'a self) -> Iter<KeyValue<'a>> {
+        self.iter()
+    }
+
     pub fn into_iter(self) -> IntoIter {
         match self.0 {
             AttrsRep::Empty => IntoIter(IntoIterRepr::Empty),