Skip to content

Commit 30506fa

Browse files
authored
Merge pull request #1301 from bud-adamas/patch-1
eliminate the warnings
2 parents b7ac1bc + c4dff96 commit 30506fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/error/multiple_error_types/boxing_errors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::error;
1313
use std::fmt;
1414
1515
// Change the alias to `Box<error::Error>`.
16-
type Result<T> = std::result::Result<T, Box<error::Error>>;
16+
type Result<T> = std::result::Result<T, Box<dyn error::Error>>;
1717
1818
#[derive(Debug, Clone)]
1919
struct EmptyVec;
@@ -29,7 +29,7 @@ impl error::Error for EmptyVec {
2929
"invalid first item to double"
3030
}
3131
32-
fn cause(&self) -> Option<&error::Error> {
32+
fn cause(&self) -> Option<&(dyn error::Error)> {
3333
// Generic error, underlying cause isn't tracked.
3434
None
3535
}

0 commit comments

Comments
 (0)