From 0ef789009f7e09133448940c59930133c514da65 Mon Sep 17 00:00:00 2001 From: Clover Johnson <95094165+callmeclover@users.noreply.github.com> Date: Tue, 23 Apr 2024 13:13:25 -0400 Subject: [PATCH] fix 6 --- src/main.rs | 2 +- src/user/model.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7b384a40..06e58ff4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -104,7 +104,7 @@ async fn handle_socket(socket: WebSocket, _who: SocketAddr, state: Arc *USER_ID.lock().unwrap() += 1; let user_id = USER_ID.lock().unwrap().clone(); - let mut user = Arc::new(Mutex::new(User::new("".into(), user_id))); + let user = Arc::new(Mutex::new(User::new("".into(), user_id))); // We subscribe *before* sending the "joined" message, so that we will also // display it to our client. diff --git a/src/user/model.rs b/src/user/model.rs index 7ab7c83e..67479dbd 100644 --- a/src/user/model.rs +++ b/src/user/model.rs @@ -58,7 +58,7 @@ impl GlassModeration { if analysis.is(Type::EVASIVE) { self.warn(); } - Ok(&censored) + Ok(censored) } }