diff options
Diffstat (limited to 'tvix/eval/src')
-rw-r--r-- | tvix/eval/src/value/list.rs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tvix/eval/src/value/list.rs b/tvix/eval/src/value/list.rs index 81abb3c07e2f..486b0c3fca76 100644 --- a/tvix/eval/src/value/list.rs +++ b/tvix/eval/src/value/list.rs @@ -79,10 +79,6 @@ impl NixList { self.0.iter() } - pub fn into_iter(self) -> std::vec::IntoIter<Value> { - self.0.into_iter() - } - /// Compare `self` against `other` for equality using Nix equality semantics pub fn nix_eq(&self, other: &Self, vm: &mut VM) -> Result<bool, ErrorKind> { if self.len() != other.len() { @@ -98,3 +94,12 @@ impl NixList { Ok(true) } } + +impl IntoIterator for NixList { + type Item = Value; + type IntoIter = std::vec::IntoIter<Value>; + + fn into_iter(self) -> std::vec::IntoIter<Value> { + self.0.into_iter() + } +} |