Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/error/multiple_error_types/boxing_errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::error;
use std::fmt;

// Change the alias to `Box<error::Error>`.
type Result<T> = std::result::Result<T, Box<error::Error>>;
type Result<T> = std::result::Result<T, Box<dyn error::Error>>;

#[derive(Debug, Clone)]
struct EmptyVec;
Expand All @@ -29,7 +29,7 @@ impl error::Error for EmptyVec {
"invalid first item to double"
}

fn cause(&self) -> Option<&error::Error> {
fn cause(&self) -> Option<&(dyn error::Error)> {
// Generic error, underlying cause isn't tracked.
None
}
Expand Down