From 13374b7928788e8cdc6c7905209bafdf943dc02e Mon Sep 17 00:00:00 2001 From: Jomar Milan Date: Tue, 9 Jun 2026 23:31:48 -0700 Subject: Maintain weak references to sessions for play sockets Changes in this commit have somewhat mollified my code-smell-o-meter. --- src/session.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/session.rs') diff --git a/src/session.rs b/src/session.rs index e472adf..acd7615 100644 --- a/src/session.rs +++ b/src/session.rs @@ -3,13 +3,10 @@ use std::collections::HashMap; pub struct Session { pub steam_name: String, - pub hands: HashMap>, + pub seats: HashMap, } -// TODO: The values on these variants will be used in the future and there will be more variants. -// Once this happens, the dead_code lint should no longer be suppressed. #[derive(Clone, Serialize, Deserialize)] -#[allow(dead_code)] pub enum HandObject { CustomDeck(CustomDeck), } @@ -40,11 +37,15 @@ pub struct CustomDeck { card_id: f64, } +pub struct Seat { + pub hand: Vec, +} + impl Session { pub fn new(steam_name: String) -> Self { Session { steam_name, - hands: HashMap::new(), + seats: HashMap::new(), } } } -- cgit v1.2.3