summaryrefslogtreecommitdiff
path: root/src/types.rs
diff options
context:
space:
mode:
authorstale <redkugelblitzin@gmail.com>2022-07-02 05:49:10 -0300
committerstale <redkugelblitzin@gmail.com>2022-07-02 05:49:10 -0300
commit517df189e71626025d33a442cebff592df2d5358 (patch)
treebd24571f39d529fe0b9412346667ba2dd6af0a4e /src/types.rs
parentcc2eb4ef053da7a53663bdecac912a1c49490301 (diff)
a bunch of stuff iunno, v 1.2
Diffstat (limited to 'src/types.rs')
-rw-r--r--src/types.rs5
1 files changed, 3 insertions, 2 deletions
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<Message>,
pub addr: SocketAddr,