From 0b82e650610b4aaa8d69f6816f82197d16ab82cd Mon Sep 17 00:00:00 2001 From: Adam <24621027+adoyle0@users.noreply.github.com> Date: Fri, 2 Aug 2024 02:46:07 -0400 Subject: [PATCH] details --- server/src/api.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/server/src/api.rs b/server/src/api.rs index 4c52d56..623e197 100644 --- a/server/src/api.rs +++ b/server/src/api.rs @@ -73,7 +73,7 @@ async fn handle_new_user( addr: &SocketAddr, ) -> Result<()> { // Create - let new_user = Arc::new(Mutex::new(generate_new_user(&state))); + let new_user = Arc::new(Mutex::new(generate_new_user(state))); // Notify client of new username sender @@ -85,18 +85,18 @@ async fn handle_new_user( // Hydrate client // this should probably be combined and sent as one - sender.send(Message::Text(chat_meta_update(&state))).await?; + sender.send(Message::Text(chat_meta_update(state))).await?; sender.send(Message::Text(motd())).await?; sender - .send(Message::Text(server_summary_update(&state))) + .send(Message::Text(server_summary_update(state))) .await?; - sender.send(Message::Text(games_update(&state))).await?; + sender.send(Message::Text(games_update(state))).await?; // Broadcast new user's existence // this should probably be combined and sent as one - state.tx.send(announce_join(&state, addr))?; - state.tx.send(server_summary_update(&state))?; - state.tx.send(chat_meta_update(&state))?; + state.tx.send(announce_join(state, addr))?; + state.tx.send(server_summary_update(state))?; + state.tx.send(chat_meta_update(state))?; Ok(()) }