From c0f93de8ce51fd5252faf969f8e0928ee8dcaad2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Fri, 22 Apr 2022 12:02:15 +0200 Subject: [PATCH] room: Remove unused GlibDateTime trait --- src/session/room/mod.rs | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/session/room/mod.rs b/src/session/room/mod.rs index 6a447a43..45de4138 100644 --- a/src/session/room/mod.rs +++ b/src/session/room/mod.rs @@ -1568,18 +1568,6 @@ impl Room { } } -trait GlibDateTime { - /// Creates a glib::DateTime from the given unix time. - fn from_unix_millis_utc( - unix_time: &MilliSecondsSinceUnixEpoch, - ) -> Result { - let millis: f64 = unix_time.get().into(); - let unix_epoch = glib::DateTime::from_unix_utc(0)?; - unix_epoch.add_seconds(millis / 1000.0) - } -} -impl GlibDateTime for glib::DateTime {} - /// Whether the given event can be used as the `latest_change` of a room. /// /// `user_id` must be the `UserId` of the current account's user.