Using if let to be more concise

This commit is contained in:
David Alber 2017-12-18 01:02:48 -08:00
parent 54067a7466
commit fa0a63989e

View File

@ -215,9 +215,8 @@ where
}
Ok(report) => reports.push(report),
Err(err) => {
match err {
IdempotentCheckError::Mismatch(msg) => print_mismatches(msg),
IdempotentCheckError::Parse => (),
if let IdempotentCheckError::Mismatch(msg) = err {
print_mismatches(msg);
}
fails += 1;
}