fix clippy warnings.
This commit is contained in:
parent
08f248c696
commit
ec0e409488
@ -9,8 +9,7 @@ pub enum ConnectorError {
|
||||
#[cfg(feature = "networking")]
|
||||
#[error("WebSocket connection failed: {source}")]
|
||||
ConnectionFailed {
|
||||
#[from]
|
||||
source: tokio_tungstenite::tungstenite::Error,
|
||||
source: Box<tokio_tungstenite::tungstenite::Error>,
|
||||
},
|
||||
|
||||
/// URL parsing error
|
||||
@ -144,3 +143,13 @@ impl From<url::ParseError> for ConnectorError {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Manual From implementation for boxed tungstenite errors
|
||||
#[cfg(feature = "networking")]
|
||||
impl From<tokio_tungstenite::tungstenite::Error> for ConnectorError {
|
||||
fn from(source: tokio_tungstenite::tungstenite::Error) -> Self {
|
||||
Self::ConnectionFailed {
|
||||
source: Box::new(source),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user