diff --git a/tvix/eval/src/value/thunk.rs b/tvix/eval/src/value/thunk.rs index 3b7cb7f5f..9d52ded3c 100644 --- a/tvix/eval/src/value/thunk.rs +++ b/tvix/eval/src/value/thunk.rs @@ -51,8 +51,8 @@ pub struct Thunk(Rc>); impl Thunk { pub fn new(lambda: Rc) -> Self { Thunk(Rc::new(RefCell::new(ThunkRepr::Suspended { + upvalues: Vec::with_capacity(lambda.upvalue_count), lambda, - upvalues: vec![], }))) } }