From c846e929a88837094d7a5383a306df1fec56c333 Mon Sep 17 00:00:00 2001 From: troido Date: Fri, 28 Feb 2020 16:41:11 +0100 Subject: more specific types! --- src/room.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/room.rs') diff --git a/src/room.rs b/src/room.rs index f3861dc..81b8cd0 100644 --- a/src/room.rs +++ b/src/room.rs @@ -59,7 +59,8 @@ use crate::{ PlayerId, RoomId, aerr, - Result + Result, + Timestamp }; @@ -142,7 +143,7 @@ impl <'a, 'b>Room<'a, 'b> { self.world.fetch::().output.clone() } - pub fn update(&mut self, timestamp: i64) { + pub fn update(&mut self, timestamp: Timestamp) { self.world.fetch_mut::().time = timestamp; self.dispatcher.dispatch(&self.world); self.world.maintain(); @@ -241,7 +242,7 @@ impl <'a, 'b>Room<'a, 'b> { emigrants } - pub fn get_time(&self) -> i64 { + pub fn get_time(&self) -> Timestamp { self.world.fetch::().time } } -- cgit