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", "Es wurden {} Probleme gefunden\n",
notices notices
.iter() .iter()
.filter(|notice| match notice { .filter(|notice| matches!(
CheckNotice::ErrorWithCode { .. } notice,
| CheckNotice::Error { .. } => true, CheckNotice::ErrorWithCode { .. } | CheckNotice::Error { .. }
_ => false, ))
})
.count() .count()
); );
notices notices