difftreelog
fix bigint from number conversion
in: master
1 file changed
crates/jrsonnet-stdlib/src/strings.rsdiffbeforeafterboth161 use jrsonnet_evaluator::runtime_error;161 use jrsonnet_evaluator::runtime_error;162 use Either2::*;162 use Either2::*;163 Ok(match v {163 Ok(match v {164 A(a) => Val::BigInt(Box::new((a as i64).into())),164 A(a) => {165 Val::BigInt(Box::new(a.to_string().parse().map_err(|e| {166 runtime_error!("number is not convertible to bigint: {e}")167 })?))168 }165 B(b) => Val::BigInt(Box::new(169 B(b) => Val::BigInt(Box::new(166 b.as_str()170 b.as_str()167 .parse()171 .parse()