This repository was archived by the owner on Aug 16, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +3
-15
lines changed Expand file tree Collapse file tree 3 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,7 @@ with_std! {
3333
3434 use Error ;
3535
36- impl <E : Display + Debug > StdError for Compat <E > {
37- fn description( & self ) -> & ' static str {
38- "An error has occurred."
39- }
40- }
36+ impl <E : Display + Debug > StdError for Compat <E > { }
4137
4238 impl From <Error > for Box <dyn StdError > {
4339 fn from( error: Error ) -> Box <dyn StdError > {
Original file line number Diff line number Diff line change @@ -28,18 +28,14 @@ pub trait ResultExt<T, E> {
2828 /// struct CustomError;
2929 ///
3030 /// impl Error for CustomError {
31- /// fn description(&self) -> &str {
32- /// "My custom error message"
33- /// }
34- ///
3531 /// fn cause(&self) -> Option<&Error> {
3632 /// None
3733 /// }
3834 /// }
3935 /// #
4036 /// # impl fmt::Display for CustomError {
4137 /// # fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
42- /// # write!(f, "{}", self.description() )
38+ /// # write!(f, "My custom error message" )
4339 /// # }
4440 /// # }
4541 /// #
Original file line number Diff line number Diff line change @@ -39,11 +39,7 @@ impl<E: Error + Send + 'static> SyncFailure<E> {
3939 ///
4040 /// // implement Display/Error for NonSyncError...
4141 /// #
42- /// # impl StdError for NonSyncError {
43- /// # fn description(&self) -> &str {
44- /// # "oops!"
45- /// # }
46- /// # }
42+ /// # impl StdError for NonSyncError {}
4743 /// #
4844 /// # impl Display for NonSyncError {
4945 /// # fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
You can’t perform that action at this time.
0 commit comments