difftreelog
fix lazy object comprehension
in: master
2 files changed
cmds/jrsonnet/Cargo.tomldiffbeforeafterboth--- a/cmds/jrsonnet/Cargo.toml
+++ b/cmds/jrsonnet/Cargo.toml
@@ -15,6 +15,7 @@
"exp-object-iteration",
"exp-bigint",
"exp-apply",
+ "exp-regex",
]
# Use mimalloc as allocator
mimalloc = ["mimallocator"]
crates/jrsonnet-evaluator/src/evaluate/mod.rsdiffbeforeafterboth596 ArrComp(expr, comp_specs) => {596 ArrComp(expr, comp_specs) => {597 let mut out = Vec::new();597 let mut out = Vec::new();598 evaluate_comp(ctx, comp_specs, &mut |ctx| {598 evaluate_comp(ctx, comp_specs, &mut |ctx| {599 #[derive(Trace)]600 struct EvaluateThunk {601 ctx: Context,602 expr: LocExpr,603 }604 impl ThunkValue for EvaluateThunk {605 type Output = Val;606 fn get(self: Box<Self>) -> Result<Val> {607 evaluate(self.ctx, &self.expr)608 }609 }599 out.push(evaluate(ctx, expr)?);610 out.push(Thunk::new(EvaluateThunk {611 ctx,612 expr: expr.clone(),613 }));600 Ok(())614 Ok(())601 })?;615 })?;602 Val::Arr(ArrValue::eager(out))616 Val::Arr(ArrValue::lazy(out))603 }617 }604 Obj(body) => Val::Obj(evaluate_object(ctx, body)?),618 Obj(body) => Val::Obj(evaluate_object(ctx, body)?),605 ObjExtend(a, b) => evaluate_add_op(619 ObjExtend(a, b) => evaluate_add_op(