git.delta.rocks / jrsonnet / refs/commits / 1e914c040ec4

difftreelog

fix make to_string unwrap value

Лач2020-07-24parent: #c40e554.patch.diff
in: master

1 file changed

modifiedcrates/jrsonnet-evaluator/src/val.rsdiffbeforeafterboth
407}407}
408408
409pub fn to_string(val: &Val) -> Result<Rc<str>> {409pub fn to_string(val: &Val) -> Result<Rc<str>> {
410 Ok(match val {410 Ok(match val.unwrap_if_lazy()? {
411 Val::Bool(true) => "true".into(),411 Val::Bool(true) => "true".into(),
412 Val::Null => "null".into(),412 Val::Null => "null".into(),
413 Val::Str(s) => s.clone(),413 Val::Str(s) => s.clone(),