Skip to content

Commit

Permalink
remove description and replace cause with source in define_error_type.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yerke committed Feb 4, 2019
1 parent 01d08e3 commit 9143868
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/error/multiple_error_types/define_error_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ impl fmt::Display for DoubleError {
// This is important for other errors to wrap this one.
impl error::Error for DoubleError {
fn description(&self) -> &str {
"invalid first item to double"
}
fn cause(&self) -> Option<&error::Error> {
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
// Generic error, underlying cause isn't tracked.
None
}
Expand Down

0 comments on commit 9143868

Please sign in to comment.