From 7021f9489129fc7fe2a0b22ce9fe34947215c64c Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Thu, 23 Nov 2023 10:13:55 +0100 Subject: [PATCH] Code cleanup: Use 'matches!()' macro --- src/main.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 916b17d..a94b818 100644 --- a/src/main.rs +++ b/src/main.rs @@ -283,11 +283,10 @@ fn main() -> Result<(), Box> { "Es wurden {} Probleme gefunden\n", notices .iter() - .filter(|notice| match notice { - CheckNotice::ErrorWithCode { .. } - | CheckNotice::Error { .. } => true, - _ => false, - }) + .filter(|notice| matches!( + notice, + CheckNotice::ErrorWithCode { .. } | CheckNotice::Error { .. } + )) .count() ); notices