From 517df189e71626025d33a442cebff592df2d5358 Mon Sep 17 00:00:00 2001 From: stale Date: Sat, 2 Jul 2022 05:49:10 -0300 Subject: a bunch of stuff iunno, v 1.2 --- src/types.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/types.rs') diff --git a/src/types.rs b/src/types.rs index 0bd7881..002b5d7 100644 --- a/src/types.rs +++ b/src/types.rs @@ -7,6 +7,7 @@ use std::{ }, fmt::Display, ops::{ Deref, DerefMut }, + num::NonZeroUsize, }; use warp::ws::Message; use tokio::sync::RwLock; @@ -17,7 +18,7 @@ use crate::livepos; #[derive(Debug, Serialize, Clone)] pub struct RoomConf { pub name: String, - pub player_cap: usize, + pub player_cap: NonZeroUsize, pub public: bool, pub board_conf: minesweeper::BoardConf, } @@ -38,7 +39,7 @@ pub enum MetaMove { Reset, } -#[derive(Debug)] +#[derive(Debug, Clone)] pub struct Conn { pub tx: tokio::sync::mpsc::UnboundedSender, pub addr: SocketAddr, -- cgit v1.2.3