From cca839ebb933781e6747b31cd3813e8f88cb2d4b Mon Sep 17 00:00:00 2001 From: sahil Date: Thu, 23 Nov 2023 13:22:24 +0000 Subject: [PATCH] fixed comp errors --- chat_messages/src/lib.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/chat_messages/src/lib.rs b/chat_messages/src/lib.rs index 913f44f..1fa6b04 100644 --- a/chat_messages/src/lib.rs +++ b/chat_messages/src/lib.rs @@ -5,20 +5,16 @@ use serde::Serialize; #[derive(serde::Deserialize, Debug, Serialize)] pub struct Message { message: String, - addr: SocketAddr, } impl Message { - pub fn new(message: String, addr: SocketAddr) -> Self { - Self { message, addr } + pub fn new(message: String) -> Self { + Self { message} } pub fn message(&self) -> &String { &self.message } - pub fn addr(&self) -> &SocketAddr { - &self.addr - } }