about summary refs log tree commit diff
path: root/tvix/eval/src/value/attrs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/value/attrs.rs')
-rw-r--r--tvix/eval/src/value/attrs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tvix/eval/src/value/attrs.rs b/tvix/eval/src/value/attrs.rs
index 51f741a210a1..74f1bd4481b2 100644
--- a/tvix/eval/src/value/attrs.rs
+++ b/tvix/eval/src/value/attrs.rs
@@ -315,8 +315,8 @@ fn attempt_optimise_kv(slice: &mut [Value]) -> Option<NixAttrs> {
     };
 
     Some(NixAttrs(AttrsRep::KV {
-        name: std::mem::replace(&mut slice[name_idx], Value::Blackhole),
-        value: std::mem::replace(&mut slice[value_idx], Value::Blackhole),
+        name: slice[name_idx].clone(),
+        value: slice[value_idx].clone(),
     }))
 }