Fix builds.

This commit is contained in:
Stephen Chung
2021-08-13 14:04:27 +08:00
parent dba4510456
commit 0f46bc7725
2 changed files with 4 additions and 4 deletions

View File

@@ -429,7 +429,7 @@ mod decimal_functions {
#[rhai_fn(return_raw)]
pub fn parse_decimal(string: &str) -> Result<Decimal, Box<EvalAltResult>> {
Decimal::from_str(string)
.or_else(|_| Decimal::from_scientific(s))
.or_else(|_| Decimal::from_scientific(string))
.map_err(|err| {
EvalAltResult::ErrorArithmetic(
format!("Error parsing decimal number '{}': {}", string, err),