about summary refs log tree commit diff
path: root/tvix/eval/src/value
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/value')
-rw-r--r--tvix/eval/src/value/attrs.rs4
-rw-r--r--tvix/eval/src/value/mod.rs4
2 files changed, 3 insertions, 5 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(),
     }))
 }
 
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs
index 6bd1efde52ff..3db6a00e4df6 100644
--- a/tvix/eval/src/value/mod.rs
+++ b/tvix/eval/src/value/mod.rs
@@ -33,7 +33,6 @@ pub enum Value {
     // Internal values that, while they technically exist at runtime,
     // are never returned to or created directly by users.
     AttrPath(Vec<NixString>),
-    Blackhole,
     NotFound,
 }
 
@@ -55,7 +54,7 @@ impl Value {
             Value::Closure(_) | Value::Builtin(_) => "lambda",
 
             // Internal types
-            Value::AttrPath(_) | Value::Blackhole | Value::NotFound => "internal",
+            Value::AttrPath(_) | Value::NotFound => "internal",
         }
     }
 
@@ -141,7 +140,6 @@ impl Display for Value {
 
             // internal types
             Value::AttrPath(path) => write!(f, "internal[attrpath({})]", path.len()),
-            Value::Blackhole => f.write_str("internal[blackhole]"),
             Value::NotFound => f.write_str("internal[not found]"),
         }
     }