diff --git a/src/compat.rs b/src/compat.rs index dec5383..1ac8cbb 100644 --- a/src/compat.rs +++ b/src/compat.rs @@ -33,11 +33,7 @@ with_std! { use Error; - impl StdError for Compat { - fn description(&self) -> &'static str { - "An error has occurred." - } - } + impl StdError for Compat {} impl From for Box { fn from(error: Error) -> Box { diff --git a/src/result_ext.rs b/src/result_ext.rs index f4125cd..3e1994e 100644 --- a/src/result_ext.rs +++ b/src/result_ext.rs @@ -28,10 +28,6 @@ pub trait ResultExt { /// struct CustomError; /// /// impl Error for CustomError { - /// fn description(&self) -> &str { - /// "My custom error message" - /// } - /// /// fn cause(&self) -> Option<&Error> { /// None /// } @@ -39,7 +35,7 @@ pub trait ResultExt { /// # /// # impl fmt::Display for CustomError { /// # fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - /// # write!(f, "{}", self.description()) + /// # write!(f, "My custom error message") /// # } /// # } /// # diff --git a/src/sync_failure.rs b/src/sync_failure.rs index 63e966c..53553ea 100644 --- a/src/sync_failure.rs +++ b/src/sync_failure.rs @@ -39,11 +39,7 @@ impl SyncFailure { /// /// // implement Display/Error for NonSyncError... /// # - /// # impl StdError for NonSyncError { - /// # fn description(&self) -> &str { - /// # "oops!" - /// # } - /// # } + /// # impl StdError for NonSyncError {} /// # /// # impl Display for NonSyncError { /// # fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {