use matches!() macro in more places

This commit is contained in:
Matthias Krüger 2020-12-24 02:55:21 +01:00
parent c34c015fe2
commit d12a358673
34 changed files with 138 additions and 270 deletions

View file

@ -118,17 +118,11 @@ impl CoverageKind {
}
pub fn is_counter(&self) -> bool {
match self {
Self::Counter { .. } => true,
_ => false,
}
matches!(self, Self::Counter { .. })
}
pub fn is_expression(&self) -> bool {
match self {
Self::Expression { .. } => true,
_ => false,
}
matches!(self, Self::Expression { .. })
}
pub fn is_unreachable(&self) -> bool {