formatting

This commit is contained in:
Lambdax committed 2023-11-22 14:05:06 +01:00
1 parent de398c0208
commit 3376eb7482
2 files changed
+6 -3

No files matched your search

-1
View File
@@ -524,7 +524,6 @@ impl Server {
} else { } else {
self.clients.swap_remove(i); self.clients.swap_remove(i);
} }
info!("Client {} disconnected!", id); info!("Client {} disconnected!", id);
} }
} }
+6 -2
View File
@@ -54,8 +54,12 @@ impl NotificationPacket {
pub fn new<S: Into<String>>(msg: S) -> Self { pub fn new<S: Into<String>>(msg: S) -> Self {
Self(format!("J{}", msg.into())) Self(format!("J{}", msg.into()))
} }
pub fn welcome<S: Into<String>>(msg: S) -> Self { Self(format!("JWelcome {}!", msg.into()))} pub fn welcome<S: Into<String>>(msg: S) -> Self {
pub fn left<S: Into<String>>(msg: S) -> Self { Self(format!("L{} left the server!", msg.into()))} Self(format!("JWelcome {}!", msg.into()))
}
pub fn left<S: Into<String>>(msg: S) -> Self {
Self(format!("L{} left the server!", msg.into()))
}
} }
/// Protocol: /// Protocol: