ClockTime: use matches! now that MSRV allows it

This commit is contained in:
François Laignel 2020-12-18 17:43:15 +01:00
parent 2f0e386037
commit a216f85abf

View file

@ -102,14 +102,8 @@ macro_rules! impl_common_ops_for_opt_int(
Self(Some(0))
}
// FIXME `matches!` was introduced in rustc 1.42.0, current MSRV is 1.41.0
// FIXME uncomment when CI can upgrade to 1.47.1
//#[allow(clippy::match_like_matches_macro)]
pub fn is_zero(&self) -> bool {
match self.0 {
Some(0) => true,
_ => false,
}
matches!(self.0, Some(0))
}
pub fn none() -> Self {