1
0
mirror of https://github.com/pcvolkmer/osc-variant.git synced 2025-04-19 19:56:50 +00:00

Code cleanup: Use 'matches!()' macro

This commit is contained in:
Paul-Christian Volkmer 2023-11-23 10:13:55 +01:00
parent 6589349b8d
commit 7021f94891

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