This commit is contained in:
shenjack 2024-11-19 22:18:43 +08:00
parent 38cfd2dce7
commit 686291755d
Signed by: shenjack
GPG Key ID: 7B1134A979775551
3 changed files with 3 additions and 7 deletions

View File

@ -69,9 +69,7 @@ impl Room {
} }
} }
fn room_id_default() -> RoomId { fn room_id_default() -> RoomId { -1 }
-1
}
#[derive(Debug, Clone, Deserialize, Serialize)] #[derive(Debug, Clone, Deserialize, Serialize)]
struct InnerRoom { struct InnerRoom {

View File

@ -50,9 +50,7 @@ pub fn help_msg() -> String { format!("{}\n{}", version_str(), HELP_MSG) }
static STARTUP_TIME: OnceLock<SystemTime> = OnceLock::new(); static STARTUP_TIME: OnceLock<SystemTime> = OnceLock::new();
pub fn start_up_time() -> SystemTime { pub fn start_up_time() -> SystemTime { *STARTUP_TIME.get().expect("WTF, why did you panic?") }
*STARTUP_TIME.get().expect("WTF, why did you panic?")
}
/// 获得当前客户端的 id /// 获得当前客户端的 id
/// 防止串号 /// 防止串号