formatting

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

View File

@@ -524,7 +524,6 @@ impl Server {
} else {
self.clients.swap_remove(i);
}
info!("Client {} disconnected!", id);
}
}

View File

@@ -54,8 +54,12 @@ impl NotificationPacket {
pub fn new<S: Into<String>>(msg: S) -> Self {
Self(format!("J{}", msg.into()))
}
pub fn welcome<S: Into<String>>(msg: S) -> Self { Self(format!("JWelcome {}!", msg.into()))}
pub fn left<S: Into<String>>(msg: S) -> Self { Self(format!("L{} left the server!", msg.into()))}
pub fn welcome<S: Into<String>>(msg: S) -> Self {
Self(format!("JWelcome {}!", msg.into()))
}
pub fn left<S: Into<String>>(msg: S) -> Self {
Self(format!("L{} left the server!", msg.into()))
}
}
/// Protocol: