diff --git a/crates/socketioxide/src/client.rs b/crates/socketioxide/src/client.rs index 6205186d..504328aa 100644 --- a/crates/socketioxide/src/client.rs +++ b/crates/socketioxide/src/client.rs @@ -1,5 +1,6 @@ use std::borrow::Cow; use std::collections::HashMap; +use std::fmt; use std::sync::{Arc, Mutex, OnceLock, RwLock}; use bytes::Bytes; @@ -212,7 +213,6 @@ impl Client { } } -#[derive(Debug)] pub struct SocketData { pub parser_state: ParserState, /// Channel used to notify the socket that it has been connected to a namespace for v5 @@ -230,6 +230,14 @@ impl Default for SocketData { } } } +impl fmt::Debug for SocketData { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + f.debug_struct("SocketData") + .field("parser_state", &self.parser_state) + .field("connect_recv_tx", &self.connect_recv_tx) + .finish() + } +} impl EngineIoHandler for Client { type Data = SocketData; diff --git a/crates/socketioxide/src/extract/socket.rs b/crates/socketioxide/src/extract/socket.rs index 47354a50..e5a14cde 100644 --- a/crates/socketioxide/src/extract/socket.rs +++ b/crates/socketioxide/src/extract/socket.rs @@ -86,7 +86,6 @@ impl fmt::Debug for SocketRef { /// /// It is generic over the [`Adapter`] type. If you plan to use it with another adapter than the default, /// make sure to have a handler that is [generic over the adapter type](crate#adapters). -#[derive(Debug)] pub struct AckSender { socket: Arc>, ack_id: Option,