Code cleanup: Use 'matches!()' macro

This commit is contained in:
pcvolkmer committed 2023-11-23 10:13:55 +01:00
1 parent 6589349b8d
commit 7021f94891
1 file changed
+4 -5
+4 -5
View File
@@ -283,11 +283,10 @@ fn main() -> Result<(), Box<dyn Error>> {
"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