difftreelog
fix lazy array initialization
in: master
2 files changed
crates/jrsonnet-evaluator/src/evaluate/mod.rsdiffbeforeafterboth18 throw,18 throw,19 typed::Typed,19 typed::Typed,20 val::{CachedUnbound, IndexableVal, StrValue, Thunk, ThunkValue},20 val::{CachedUnbound, IndexableVal, StrValue, Thunk, ThunkValue},21 Context, GcHashMap, ObjValue, ObjValueBuilder, ObjectAssertion, Pending, Result, State,21 Context, GcHashMap, ObjValue, ObjValueBuilder, ObjectAssertion, Pending, Result, ResultExt,22 Unbound, Val,22 State, Unbound, Val,23};23};24pub mod destructure;24pub mod destructure;134134135 let fctx = Pending::new();135 let fctx = Pending::new();136 let mut new_bindings = GcHashMap::with_capacity(var.capacity_hint());136 let mut new_bindings = GcHashMap::with_capacity(var.capacity_hint());137 let value = Thunk::evaluated(Val::Arr(ArrValue::lazy(Cc::new(vec![137 let value = Thunk::evaluated(Val::Arr(ArrValue::lazy(vec![138 Thunk::evaluated(Val::Str(StrValue::Flat(field.clone()))),138 Thunk::evaluated(Val::Str(StrValue::Flat(field.clone()))),139 Thunk::new(ObjectFieldThunk {139 Thunk::new(ObjectFieldThunk {140 field: field.clone(),140 field: field.clone(),141 obj: obj.clone(),141 obj: obj.clone(),142 }),142 }),143 ]))));143 ])));144 destruct(var, value, fctx.clone(), &mut new_bindings)?;144 destruct(var, value, fctx.clone(), &mut new_bindings)?;145 let ctx = ctx145 let ctx = ctx146 .clone()146 .clone()crates/jrsonnet-parser/src/expr.rsdiffbeforeafterboth26#[cfg_attr(feature = "structdump", derive(Codegen))]26#[cfg_attr(feature = "structdump", derive(Codegen))]27#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]27#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]28#[derive(Debug, Clone, Copy, PartialEq, Eq, Trace)]28#[derive(Debug, Clone, Copy, PartialEq, Eq, Trace)]29#[repr(u8)]29pub enum Visibility {30pub enum Visibility {30 /// :31 /// :31 Normal,32 Normal,