From 9782c094b7d917c750dddb180197e8bb24514645 Mon Sep 17 00:00:00 2001 From: KtorZ Date: Fri, 8 Sep 2023 16:21:07 +0200 Subject: [PATCH] Fix clippy suggestions. --- crates/uplc/src/machine/eval_result.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/uplc/src/machine/eval_result.rs b/crates/uplc/src/machine/eval_result.rs index c35c860ba..2841e5645 100644 --- a/crates/uplc/src/machine/eval_result.rs +++ b/crates/uplc/src/machine/eval_result.rs @@ -34,9 +34,9 @@ impl EvalResult { pub fn failed(&self, can_error: bool) -> bool { if can_error { - !matches!(self.result, Err(_)) + self.result.is_ok() } else { - matches!(self.result, Err(_)) + self.result.is_err() || matches!(self.result, Ok(Term::Error)) || matches!(self.result, Ok(Term::Constant(ref con)) if matches!(con.as_ref(), Constant::Bool(false))) }