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! {
33
33
34
34
use Error ;
35
35
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 > { }
41
37
42
38
impl From <Error > for Box <dyn StdError > {
43
39
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> {
28
28
/// struct CustomError;
29
29
///
30
30
/// impl Error for CustomError {
31
- /// fn description(&self) -> &str {
32
- /// "My custom error message"
33
- /// }
34
- ///
35
31
/// fn cause(&self) -> Option<&Error> {
36
32
/// None
37
33
/// }
38
34
/// }
39
35
/// #
40
36
/// # impl fmt::Display for CustomError {
41
37
/// # fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
42
- /// # write!(f, "{}", self.description() )
38
+ /// # write!(f, "My custom error message" )
43
39
/// # }
44
40
/// # }
45
41
/// #
Original file line number Diff line number Diff line change @@ -39,11 +39,7 @@ impl<E: Error + Send + 'static> SyncFailure<E> {
39
39
///
40
40
/// // implement Display/Error for NonSyncError...
41
41
/// #
42
- /// # impl StdError for NonSyncError {
43
- /// # fn description(&self) -> &str {
44
- /// # "oops!"
45
- /// # }
46
- /// # }
42
+ /// # impl StdError for NonSyncError {}
47
43
/// #
48
44
/// # impl Display for NonSyncError {
49
45
/// # fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
You can’t perform that action at this time.
0 commit comments