diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/error.rs b/src/error.rs index 9c3a916..cd1d7c2 100644 --- a/src/error.rs +++ b/src/error.rs @@ -22,12 +22,6 @@ impl Error for IllegalArgumentException { } } -impl From<Box<dyn Error>> for IllegalArgumentException { - fn from(error: Box<dyn Error>) -> Self { - IllegalArgumentException::new(&error.to_string()) - } -} - #[derive(Debug)] pub struct IllegalStateException { details: String @@ -49,22 +43,4 @@ impl Error for IllegalStateException { fn description(&self) -> &str { &self.details } -} - -impl From<Box<dyn Error>> for IllegalStateException { - fn from(error: Box<dyn Error>) -> Self { - IllegalStateException::new(&error.to_string()) - } -} - -impl From<serde_urlencoded::ser::Error> for IllegalStateException { - fn from(err: serde_urlencoded::ser::Error) -> Self { - IllegalStateException::new(&format!("Serialization error: {}", err)) - } -} - -impl From<tokio_tungstenite::tungstenite::Error> for IllegalStateException { - fn from(err: tokio_tungstenite::tungstenite::Error) -> Self { - IllegalStateException::new(&format!("WebSocket error: {}", err)) - } }
\ No newline at end of file |