fixed incorrect ranges

This commit is contained in:
Valerie Wolfe 2024-07-09 14:18:23 -04:00
parent f9e8696d72
commit ce65fefcba

View file

@ -15,7 +15,7 @@ pub fn fix(arg: &Value) -> EvalResult {
let count = args.len();
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()?;
@ -63,7 +63,7 @@ pub fn logarithm(arg: &Value) -> EvalResult {
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);