We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b7ac1bc + c4dff96 commit 30506faCopy full SHA for 30506fa
src/error/multiple_error_types/boxing_errors.md
@@ -13,7 +13,7 @@ use std::error;
13
use std::fmt;
14
15
// Change the alias to `Box<error::Error>`.
16
-type Result<T> = std::result::Result<T, Box<error::Error>>;
+type Result<T> = std::result::Result<T, Box<dyn error::Error>>;
17
18
#[derive(Debug, Clone)]
19
struct EmptyVec;
@@ -29,7 +29,7 @@ impl error::Error for EmptyVec {
29
"invalid first item to double"
30
}
31
32
- fn cause(&self) -> Option<&error::Error> {
+ fn cause(&self) -> Option<&(dyn error::Error)> {
33
// Generic error, underlying cause isn't tracked.
34
None
35
0 commit comments