From 87446d4d8e66d8844cdb3239c30370ccc8967d69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Fri, 18 Dec 2020 18:00:22 +0100 Subject: [PATCH] ClockTime: const for zero & none constructors --- gstreamer/src/clock_time.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gstreamer/src/clock_time.rs b/gstreamer/src/clock_time.rs index 039cefc92..e2c14d7bc 100644 --- a/gstreamer/src/clock_time.rs +++ b/gstreamer/src/clock_time.rs @@ -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) } }