fix clippy.

This commit is contained in:
utam0k 2020-07-19 23:37:05 +09:00
parent 9c4e3787f5
commit 0d7cf72ed2

View File

@ -60,8 +60,7 @@ pub fn compute_values(
Operator::Minus => Ok(UntaggedValue::Primitive(Primitive::Int(x - y))),
Operator::Multiply => Ok(UntaggedValue::Primitive(Primitive::Int(x * y))),
Operator::Divide => Ok(UntaggedValue::Primitive(Primitive::Decimal(
bigdecimal::BigDecimal::from(x.clone())
/ bigdecimal::BigDecimal::from(y.clone()),
bigdecimal::BigDecimal::from(*x) / bigdecimal::BigDecimal::from(y.clone()),
))),
_ => Err((left.type_name(), right.type_name())),
},