From a660ed7f1a55852ecacd4f42f1613e7d541130a0 Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Wed, 11 Jan 2017 20:27:17 -0800 Subject: [PATCH] Remove unnecessary trait --- src/errors.rs | 9 ++------- src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/errors.rs b/src/errors.rs index 78bc44c..01329b9 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -38,7 +38,7 @@ pub enum Error { App(E), } -impl fmt::Display for Error { +impl fmt::Display for Error { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { Error::ClientDeserialize(ref e) => write!(f, r#"{}: "{}""#, self.description(), e), @@ -51,7 +51,7 @@ impl fmt::Display for Error { } } -impl StdError for Error { +impl StdError for Error { fn description(&self) -> &str { match *self { Error::ClientDeserialize(_) => "The client failed to deserialize the server response.", @@ -102,8 +102,3 @@ pub enum WireError { /// The server was unable to reply to the rpc for some reason. App(E), } - -/// A serializable error. -pub trait SerializableError: StdError + Deserialize + Serialize + Send + 'static {} - -impl SerializableError for E {} diff --git a/src/lib.rs b/src/lib.rs index f966480..4c1d3a1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -90,7 +90,7 @@ pub extern crate tokio_service; pub use client::Client; #[doc(hidden)] pub use client::future::{ConnectFuture, ConnectWithFuture}; -pub use errors::{Error, SerializableError}; +pub use errors::Error; #[doc(hidden)] pub use errors::WireError; #[doc(hidden)]