ClockTime: const for zero & none constructors

This commit is contained in:
François Laignel 2020-12-18 18:00:22 +01:00
parent a216f85abf
commit 87446d4d8e

View file

@ -98,7 +98,7 @@ macro_rules! impl_common_ops_for_opt_int(
}
}
pub fn zero() -> Self {
pub const fn zero() -> Self {
Self(Some(0))
}
@ -106,7 +106,7 @@ macro_rules! impl_common_ops_for_opt_int(
matches!(self.0, Some(0))
}
pub fn none() -> Self {
pub const fn none() -> Self {
Self(None)
}
}