From 59a26742ce19e70106e5b943919998787eb15179 Mon Sep 17 00:00:00 2001 From: emma Date: Sun, 18 Jun 2023 16:23:52 -0600 Subject: [PATCH] message routing --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 02e97c8..0a7459d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -83,15 +83,15 @@ fn handle_client( .clone() .lock() .unwrap() - .drain() { + .iter() { - if id == client { continue } + if id == &client { continue } if let Err(err) = stream.write_all( format!( "{}BODY {}\n", write_from, - message.body.clone().unwrap() + message.body.clone().unwrap(), ).as_bytes() ) { eprintln!("{}: {}", id, err);