fixed incorrect ranges
This commit is contained in:
parent
f9e8696d72
commit
ce65fefcba
1 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ pub fn fix(arg: &Value) -> EvalResult {
|
||||||
|
|
||||||
let count = args.len();
|
let count = args.len();
|
||||||
if count != 2 {
|
if count != 2 {
|
||||||
return Err(EvalexprError::WrongFunctionArgumentAmount { expected: 2, actual: count });
|
return Err(EvalexprError::WrongFunctionArgumentAmount { expected: 2..=2, actual: count });
|
||||||
}
|
}
|
||||||
|
|
||||||
let float = args[0].as_float()?;
|
let float = args[0].as_float()?;
|
||||||
|
@ -63,7 +63,7 @@ pub fn logarithm(arg: &Value) -> EvalResult {
|
||||||
output = value.log(base).into();
|
output = value.log(base).into();
|
||||||
},
|
},
|
||||||
_ => {
|
_ => {
|
||||||
return Err(EvalexprError::WrongFunctionArgumentAmount { expected: 2, actual: count });
|
return Err(EvalexprError::WrongFunctionArgumentAmount { expected: 2..=2, actual: count });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Ok(output);
|
return Ok(output);
|
||||||
|
|
Loading…
Reference in a new issue