From 5d2ae840f13641a6f699ab77d43e41d98f459053 Mon Sep 17 00:00:00 2001 From: Aspen Smith Date: Sat, 10 Feb 2024 12:21:06 -0500 Subject: refactor(tvix/eval): Box the inside of Value::Json serde_json::Value is pretty large, and is contributing (albeit not exclusively) to the large size of the Value repr. Putting it in a box is *especially* cheap (since it's rarely used) and allows us to (eventually) cut down on the size of Value. Change-Id: I005a802d8527b639beb4e938e3320b11ffa1ef23 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10795 Reviewed-by: sterni Autosubmit: aspen Tested-by: BuildkiteCI --- tvix/eval/src/vm/generators.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/eval/src/vm/generators.rs') 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 { 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: {}", -- cgit 1.4.1