difftreelog
fix experimental features build
in: master
3 files changed
cmds/jrsonnet/src/main.rsdiffbeforeafterboth187187188 let tla = opts.tla.tla_opts()?;188 let tla = opts.tla.tla_opts()?;189 #[allow(unused_mut)]189 #[allow(190 // It is not redundant/unused in exp-apply191 unused_mut,192 clippy::redundant_clone,193 )]190 let mut val = apply_tla(s, &tla, val)?;194 let mut val = apply_tla(s.clone(), &tla, val)?;191195192 #[cfg(feature = "exp-apply")]196 #[cfg(feature = "exp-apply")]193 for apply in opts.input.exp_apply {197 for apply in opts.input.exp_apply {crates/jrsonnet-stdlib/src/arrays.rsdiffbeforeafterboth71pub fn builtin_map_with_key(func: FuncVal, obj: ObjValue) -> Result<ObjValue> {71pub fn builtin_map_with_key(func: FuncVal, obj: ObjValue) -> Result<ObjValue> {72 let mut out = ObjValueBuilder::new();72 let mut out = ObjValueBuilder::new();73 for (k, v) in obj.iter() {73 for (k, v) in obj.iter(74 // Makes sense mapped object should be ordered the same way, should not break anything when the output is not ordered (the default).75 // The thrown error might be different, but jsonnet76 // does not specify the evaluation order.77 #[cfg(feature = "exp-preserve-order")]78 true,79 ) {74 let v = v?;80 let v = v?;75 out.field(k.clone())81 out.field(k.clone())crates/jrsonnet-stdlib/src/misc.rsdiffbeforeafterboth147 if equals(&a, &b)? {147 if equals(&a, &b)? {148 return Ok(true);148 return Ok(true);149 }149 }150 // TODO: Use debug output format150 let format = JsonFormat::std_to_json(" ".to_owned(), "\n", ": ");151 let format = JsonFormat::std_to_json(152 " ".to_owned(),153 "\n",154 ": ",155 #[cfg(feature = "exp-preserve-order")]156 true,157 );151 let a = a.manifest(&format).description("<a> manifestification")?;158 let a = a.manifest(&format).description("<a> manifestification")?;152 let b = b.manifest(&format).description("<b> manifestification")?;159 let b = b.manifest(&format).description("<b> manifestification")?;163 };170 };164 let target_fields = target.fields().into_iter().collect::<BTreeSet<IStr>>();171 let target_fields = target172 .fields(173 // FIXME: Makes no sense to preserve order for BTreeSet, it would be better to use IndexSet here?174 // But IndexSet won't allow fast ordered union...175 // // Makes sense to preserve source ordering where possible.176 // // May affect evaluation order, but it is not specified by jsonnet spec.177 // #[cfg(feature = "exp-preserve-order")]178 // true,179 #[cfg(feature = "exp-preserve-order")]180 false,181 )182 .into_iter()183 .collect::<BTreeSet<IStr>>();165 let patch_fields = patch.fields().into_iter().collect::<BTreeSet<IStr>>();184 let patch_fields = patch185 .fields(186 // No need to look at the patch field order, I think?187 // New fields (that will be appended at the end) will be alphabeticaly-ordered,188 // but it is fine for jsonpatch, I don't think people write jsonpatch in jsonnet,189 // when they can use mixins.190 #[cfg(feature = "exp-preserve-order")]191 false,192 )193 .into_iter()194 .collect::<BTreeSet<IStr>>();