From 7e286aab1a573edc9aef16bb68e9907371917adc Mon Sep 17 00:00:00 2001 From: Aspen Smith Date: Sat, 10 Feb 2024 12:39:24 -0500 Subject: feat(tvix/eval): Box Value::Catchable This is now the only enum variant for Value that is larger than 8 bytes (it's 16 bytes), so boxing it (especially since it's not perf-critical) allows us to get the Value size down to only 16 bytes! Change-Id: I98598e2b762944448bef982e8ff7da6d6683c4aa Reviewed-on: https://cl.tvl.fyi/c/depot/+/10798 Tested-by: BuildkiteCI Reviewed-by: raitobezarius Autosubmit: aspen --- tvix/eval/src/compiler/import.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/eval/src/compiler/import.rs') diff --git a/tvix/eval/src/compiler/import.rs b/tvix/eval/src/compiler/import.rs index 4e8ea7195d81..6774c7b8922c 100644 --- a/tvix/eval/src/compiler/import.rs +++ b/tvix/eval/src/compiler/import.rs @@ -27,7 +27,7 @@ async fn import_impl( ) -> Result { // TODO(sterni): canon_path()? let mut path = match coerce_value_to_path(&co, args.pop().unwrap()).await? { - Err(cek) => return Ok(Value::Catchable(cek)), + Err(cek) => return Ok(Value::Catchable(Box::new(cek))), Ok(path) => path, }; -- cgit 1.4.1