difftreelog
fix make std.format not consume field on %%
in: master
1 file changed
crates/jrsonnet-evaluator/src/builtin/format.rsdiffbeforeafterboth670 Element::Code(c) => {670 Element::Code(c) => {671 // TODO: Operate on ref671 // TODO: Operate on ref672 let f: Rc<str> = c.mkey.into();672 let f: Rc<str> = c.mkey.into();673 if f.is_empty() {674 throw!(MappingKeysRequired);675 }676 let width = match c.width {673 let width = match c.width {677 Width::Star => {674 Width::Star => {678 throw!(CannotUseStarWidthWithObject);675 throw!(CannotUseStarWidthWithObject);687 None => None,684 None => None,688 };685 };686687 let value = if c.convtype == ConvTypeV::Percent {688 Val::Null689 } else {690 if f.is_empty() {691 throw!(MappingKeysRequired);692 }689 let value = if let Some(v) = values.get(f.clone())? {693 let value = if let Some(v) = values.get(f.clone())? {690 v694 v691 } else {695 } else {692 throw!(NoSuchFormatField(f));696 throw!(NoSuchFormatField(f));693 };697 };698 value699 };694700695 format_code(&mut out, &value, &c, width, precision)?;701 format_code(&mut out, &value, &c, width, precision)?;696 }702 }