diff options
author | stale <redkugelblitzin@gmail.com> | 2022-07-12 23:34:58 -0300 |
---|---|---|
committer | stale <redkugelblitzin@gmail.com> | 2022-07-12 23:34:58 -0300 |
commit | 4e0bdd3f093f345dcdf49e46a2bd7e8bfaf4dfff (patch) | |
tree | c39b46bcc3370da4d6bdf20d7eed310b8f813aa5 /src/livepos.rs | |
parent | 02098f0d579259545584e246f64ed5e41be9537b (diff) |
rework old, dumb code
Diffstat (limited to 'src/livepos.rs')
-rw-r--r-- | src/livepos.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/livepos.rs b/src/livepos.rs index b19eda6..08f3246 100644 --- a/src/livepos.rs +++ b/src/livepos.rs @@ -7,7 +7,7 @@ use tokio::time::{self, Duration}; use warp::ws::Message; pub enum ReqData { - Pos((usize,usize)), + Pos((u32,u32)), StateDump, Quit, } @@ -69,7 +69,7 @@ pub async fn livepos(players: Arc<RwLock<PlayerMap>>, mut recv: tokio_mpsc::Unbo ); } -fn jsonenc_ids<'a, I: IntoIterator<Item=&'a usize>>(positions: &mut HashMap<usize, (usize,usize)>, ids: I) -> Result<String, serde_json::Error> { +fn jsonenc_ids<'a, I: IntoIterator<Item=&'a usize>>(positions: &mut HashMap<usize, (u32,u32)>, ids: I) -> Result<String, serde_json::Error> { let mut pairs = Vec::new(); for id in ids { pairs.push((id, positions[id])); |