Skip to content

Commit 9143868

Browse files
committed
remove description and replace cause with source in define_error_type.md
1 parent 01d08e3 commit 9143868

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/error/multiple_error_types/define_error_type.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ impl fmt::Display for DoubleError {
4040
4141
// This is important for other errors to wrap this one.
4242
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)> {
4844
// Generic error, underlying cause isn't tracked.
4945
None
5046
}

0 commit comments

Comments
 (0)