diff options
Diffstat (limited to 'tvix/eval')
-rw-r--r-- | tvix/eval/src/value/list.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tvix/eval/src/value/list.rs b/tvix/eval/src/value/list.rs index 66f7eb8108e9..8ea3db7aecf3 100644 --- a/tvix/eval/src/value/list.rs +++ b/tvix/eval/src/value/list.rs @@ -100,6 +100,11 @@ impl NixList { Ok(true) } + + /// force each element of the list (shallowly), making it safe to call .get().value() + pub fn force_elements(&self, vm: &mut VM) -> Result<(), ErrorKind> { + self.iter().try_for_each(|v| v.force(vm).map(|_| ())) + } } impl IntoIterator for NixList { |