removed unnecessary return statement

This commit is contained in:
alessandrokonrad 2022-10-17 12:14:13 +02:00 committed by Lucas
parent 0856f6ccf2
commit ad542a68e8
1 changed files with 3 additions and 3 deletions

View File

@ -330,7 +330,7 @@ impl DefaultFunction {
(Value::Con(Constant::Integer(arg1)), Value::Con(Constant::Integer(arg2))) => { (Value::Con(Constant::Integer(arg1)), Value::Con(Constant::Integer(arg2))) => {
match arg1.checked_add(*arg2) { match arg1.checked_add(*arg2) {
Some(res) => Ok(Value::Con(Constant::Integer(res))), Some(res) => Ok(Value::Con(Constant::Integer(res))),
None => return Err(Error::OverflowError), None => Err(Error::OverflowError),
} }
} }
_ => unreachable!(), _ => unreachable!(),
@ -339,7 +339,7 @@ impl DefaultFunction {
(Value::Con(Constant::Integer(arg1)), Value::Con(Constant::Integer(arg2))) => { (Value::Con(Constant::Integer(arg1)), Value::Con(Constant::Integer(arg2))) => {
match arg1.checked_sub(*arg2) { match arg1.checked_sub(*arg2) {
Some(res) => Ok(Value::Con(Constant::Integer(res))), Some(res) => Ok(Value::Con(Constant::Integer(res))),
None => return Err(Error::OverflowError), None => Err(Error::OverflowError),
} }
} }
_ => unreachable!(), _ => unreachable!(),
@ -348,7 +348,7 @@ impl DefaultFunction {
(Value::Con(Constant::Integer(arg1)), Value::Con(Constant::Integer(arg2))) => { (Value::Con(Constant::Integer(arg1)), Value::Con(Constant::Integer(arg2))) => {
match arg1.checked_mul(*arg2) { match arg1.checked_mul(*arg2) {
Some(res) => Ok(Value::Con(Constant::Integer(res))), Some(res) => Ok(Value::Con(Constant::Integer(res))),
None => return Err(Error::OverflowError), None => Err(Error::OverflowError),
} }
} }
_ => unreachable!(), _ => unreachable!(),