File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed
src/error/multiple_error_types Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -40,11 +40,7 @@ impl fmt::Display for DoubleError {
40
40
41
41
// This is important for other errors to wrap this one.
42
42
impl error::Error for DoubleError {
43
- fn description(&self) -> &str {
44
- "invalid first item to double"
45
- }
46
-
47
- fn cause(&self) -> Option<&error::Error> {
43
+ fn source(&self) -> Option<&(dyn error::Error + 'static)> {
48
44
// Generic error, underlying cause isn't tracked.
49
45
None
50
46
}
Original file line number Diff line number Diff line change @@ -29,15 +29,7 @@ impl fmt::Display for DoubleError {
29
29
}
30
30
31
31
impl error::Error for DoubleError {
32
- fn description(&self) -> &str {
33
- match *self {
34
- DoubleError::EmptyVec => "empty vectors not allowed",
35
- // This already impls `Error`, so defer to its own implementation.
36
- DoubleError::Parse(ref e) => e.description(),
37
- }
38
- }
39
-
40
- fn cause(&self) -> Option<&error::Error> {
32
+ fn source(&self) -> Option<&(dyn error::Error + 'static)> {
41
33
match *self {
42
34
DoubleError::EmptyVec => None,
43
35
// The cause is the underlying implementation error type. Is implicitly
You can’t perform that action at this time.
0 commit comments