[fractal] room: Remove unused GlibDateTime trait



commit c0f93de8ce51fd5252faf969f8e0928ee8dcaad2
Author: Kévin Commaille <zecakeh tedomum fr>
Date:   Fri Apr 22 12:02:15 2022 +0200

    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 6a447a43a..45de41387 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<glib::DateTime, glib::BoolError> {
-        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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]