From fbab8fe5e8a61645793f0cbee9330c1a22a832e5 Mon Sep 17 00:00:00 2001 From: jake Date: Sat, 22 Oct 2022 14:05:38 -0600 Subject: [PATCH] cleanup errors --- src/common/mainloop/client.rs | 1 - src/ship/location.rs | 3 ++- src/ship/ship.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/mainloop/client.rs b/src/common/mainloop/client.rs index 758d075..1d24600 100644 --- a/src/common/mainloop/client.rs +++ b/src/common/mainloop/client.rs @@ -191,7 +191,6 @@ where C: PSOCipher, { let buf = pkt.as_bytes(); - trace!("[send buf] {:?}", buf); let cbuf = cipher.encrypt(&buf)?; socket.write_all(&cbuf).await?; Ok(()) diff --git a/src/ship/location.rs b/src/ship/location.rs index 66cb7ad..b3f16cc 100644 --- a/src/ship/location.rs +++ b/src/ship/location.rs @@ -69,9 +69,10 @@ pub enum ClientRemovalError { } #[derive(Error, Debug, PartialEq, Eq)] -#[error("get clients")] pub enum GetClientsError { + #[error("invalid client")] InvalidClient, + #[error("invalid area")] InvalidArea, } diff --git a/src/ship/ship.rs b/src/ship/ship.rs index 71469fe..a71cc14 100644 --- a/src/ship/ship.rs +++ b/src/ship/ship.rs @@ -104,7 +104,7 @@ pub enum ShipError { InvalidSlot(ClientId, u32), #[error("too many clients")] TooManyClients, - #[error("client error location {0}")] + #[error("client location {0}")] ClientLocationError(ClientLocationError), #[error("maps error {0}")] MapsError(#[from] MapsError),