diff --git a/socktop_connector/src/error.rs b/socktop_connector/src/error.rs index 9d9ced8..f9bce15 100644 --- a/socktop_connector/src/error.rs +++ b/socktop_connector/src/error.rs @@ -9,8 +9,7 @@ pub enum ConnectorError { #[cfg(feature = "networking")] #[error("WebSocket connection failed: {source}")] ConnectionFailed { - #[from] - source: tokio_tungstenite::tungstenite::Error, + source: Box, }, /// URL parsing error @@ -144,3 +143,13 @@ impl From for ConnectorError { } } } + +// Manual From implementation for boxed tungstenite errors +#[cfg(feature = "networking")] +impl From for ConnectorError { + fn from(source: tokio_tungstenite::tungstenite::Error) -> Self { + Self::ConnectionFailed { + source: Box::new(source), + } + } +}