use matches!() macro for simple if let conditions
This commit is contained in:
@@ -160,10 +160,10 @@ pub enum StabilityLevel {
|
||||
|
||||
impl StabilityLevel {
|
||||
pub fn is_unstable(&self) -> bool {
|
||||
if let StabilityLevel::Unstable { .. } = *self { true } else { false }
|
||||
matches!(self, StabilityLevel::Unstable { .. })
|
||||
}
|
||||
pub fn is_stable(&self) -> bool {
|
||||
if let StabilityLevel::Stable { .. } = *self { true } else { false }
|
||||
matches!(self, StabilityLevel::Stable { .. })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user