Fix clippy suggestions.

This commit is contained in:
KtorZ 2023-09-08 16:21:07 +02:00
parent 8ba5946c32
commit 9782c094b7
No known key found for this signature in database
GPG Key ID: 33173CB6F77F4277
1 changed files with 2 additions and 2 deletions

View File

@ -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)))
}