difftreelog
feat support arbitrary values in std.trace
in: master
1 file changed
crates/jrsonnet-stdlib/src/misc.rsdiffbeforeafterboth55pub fn builtin_trace(55pub fn builtin_trace(56 this: &builtin_trace,56 this: &builtin_trace,57 loc: CallLocation,57 loc: CallLocation,58 str: IStr,58 str: Val,59 rest: Thunk<Val>,59 rest: Thunk<Val>,60) -> Result<Val> {60) -> Result<Val> {61 this.settings.borrow().trace_printer.print_trace(loc, str);61 this.settings.borrow().trace_printer.print_trace(62 loc,63 match str {64 Val::Str(s) => s.into_flat(),65 Val::Func(f) => format!("{f:?}").into(),66 v => v67 .manifest(JsonFormat::std_to_json(68 String::from(" "),69 "\n",70 ": ",71 #[cfg(feature = "exp-preserve-order")]72 true,73 ))?74 .into(),75 },76 );62 rest.evaluate()77 rest.evaluate()63}78}