From ad542a68e8cf519b7e64e0e07197d571d1d68641 Mon Sep 17 00:00:00 2001 From: alessandrokonrad Date: Mon, 17 Oct 2022 12:14:13 +0200 Subject: [PATCH] removed unnecessary return statement --- crates/uplc/src/machine/runtime.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/uplc/src/machine/runtime.rs b/crates/uplc/src/machine/runtime.rs index cd93ea1e..a4934dce 100644 --- a/crates/uplc/src/machine/runtime.rs +++ b/crates/uplc/src/machine/runtime.rs @@ -330,7 +330,7 @@ impl DefaultFunction { (Value::Con(Constant::Integer(arg1)), Value::Con(Constant::Integer(arg2))) => { match arg1.checked_add(*arg2) { Some(res) => Ok(Value::Con(Constant::Integer(res))), - None => return Err(Error::OverflowError), + None => Err(Error::OverflowError), } } _ => unreachable!(), @@ -339,7 +339,7 @@ impl DefaultFunction { (Value::Con(Constant::Integer(arg1)), Value::Con(Constant::Integer(arg2))) => { match arg1.checked_sub(*arg2) { Some(res) => Ok(Value::Con(Constant::Integer(res))), - None => return Err(Error::OverflowError), + None => Err(Error::OverflowError), } } _ => unreachable!(), @@ -348,7 +348,7 @@ impl DefaultFunction { (Value::Con(Constant::Integer(arg1)), Value::Con(Constant::Integer(arg2))) => { match arg1.checked_mul(*arg2) { Some(res) => Ok(Value::Con(Constant::Integer(res))), - None => return Err(Error::OverflowError), + None => Err(Error::OverflowError), } } _ => unreachable!(),