summaryrefslogtreecommitdiff
path: root/src/livepos.rs
diff options
context:
space:
mode:
authorstale <redkugelblitzin@gmail.com>2022-07-12 23:34:58 -0300
committerstale <redkugelblitzin@gmail.com>2022-07-12 23:34:58 -0300
commit4e0bdd3f093f345dcdf49e46a2bd7e8bfaf4dfff (patch)
treec39b46bcc3370da4d6bdf20d7eed310b8f813aa5 /src/livepos.rs
parent02098f0d579259545584e246f64ed5e41be9537b (diff)
rework old, dumb code
Diffstat (limited to 'src/livepos.rs')
-rw-r--r--src/livepos.rs4
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]));