about summary refs log tree commit diff
path: root/tvix/eval
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval')
-rw-r--r--tvix/eval/src/value/json.rs2
-rw-r--r--tvix/eval/src/value/mod.rs2
-rw-r--r--tvix/eval/src/vm/generators.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/tvix/eval/src/value/json.rs b/tvix/eval/src/value/json.rs
index c2f8b2c2b1ef..5c627540dbe8 100644
--- a/tvix/eval/src/value/json.rs
+++ b/tvix/eval/src/value/json.rs
@@ -111,7 +111,7 @@ impl Value {
     pub(crate) async fn into_json_generator(self, co: GenCo) -> Result<Value, ErrorKind> {
         match self.into_json(&co).await? {
             Err(cek) => Ok(Value::Catchable(cek)),
-            Ok(json) => Ok(Value::Json(json)),
+            Ok(json) => Ok(Value::Json(Box::new(json))),
         }
     }
 }
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs
index e0c5a2f512cf..043788da4596 100644
--- a/tvix/eval/src/value/mod.rs
+++ b/tvix/eval/src/value/mod.rs
@@ -78,7 +78,7 @@ pub enum Value {
     #[serde(skip)]
     UnresolvedPath(Box<Path>),
     #[serde(skip)]
-    Json(serde_json::Value),
+    Json(Box<serde_json::Value>),
 
     #[serde(skip)]
     FinaliseRequest(bool),
diff --git a/tvix/eval/src/vm/generators.rs b/tvix/eval/src/vm/generators.rs
index e5468fb06d4a..cffe36e60239 100644
--- a/tvix/eval/src/vm/generators.rs
+++ b/tvix/eval/src/vm/generators.rs
@@ -775,7 +775,7 @@ pub(crate) async fn request_to_json(
     value: Value,
 ) -> Result<serde_json::Value, CatchableErrorKind> {
     match co.yield_(VMRequest::ToJson(value)).await {
-        VMResponse::Value(Value::Json(json)) => Ok(json),
+        VMResponse::Value(Value::Json(json)) => Ok(*json),
         VMResponse::Value(Value::Catchable(cek)) => Err(cek),
         msg => panic!(
             "Tvix bug: VM responded with incorrect generator message: {}",