Skip to content

Commit

Permalink
Fix clippy suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Sep 8, 2023
1 parent 8ba5946 commit 9782c09
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/uplc/src/machine/eval_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
}
Expand Down

0 comments on commit 9782c09

Please sign in to comment.