From ec2a2878429c05cc172cfb00da36879531c51b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 24 Dec 2020 12:46:27 +0200 Subject: [PATCH] gstreamer/datetime: Update for glib::DateTime API changes --- gstreamer/src/date_time.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/gstreamer/src/date_time.rs b/gstreamer/src/date_time.rs index 238f72651..f8ae2d0ca 100644 --- a/gstreamer/src/date_time.rs +++ b/gstreamer/src/date_time.rs @@ -296,10 +296,7 @@ impl DateTime { // however, the resulting instance can't be translated to `glib::DateTime` if self.has_second() { self.to_g_date_time() - .and_then(|d| { - d.to_utc() - .ok_or_else(|| glib::bool_error!("Can't convert datetime to UTC")) - }) + .and_then(|d| d.to_utc()) .map(|d| d.into()) } else { // It would be cheaper to build a `glib::DateTime` direcly, unfortunetaly @@ -316,10 +313,7 @@ impl DateTime { Some(0.0), ) .and_then(|d| d.to_g_date_time()) - .and_then(|d| { - d.to_utc() - .ok_or_else(|| glib::bool_error!("Can't convert datetime to UTC")) - }) + .and_then(|d| d.to_utc()) .and_then(|d| { DateTime::new( None, // UTC TZ offset