Skip to content

Commit 5d60010

Browse files
committed
Add example of using cause() with boxed error
1 parent 9721bfa commit 5d60010

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@
8686
//! Utf8(err: std::str::Utf8Error) {
8787
//! description("utf8 error")
8888
//! }
89+
//! Other(err: Box<std::error::Error>) {
90+
//! cause(&**err)
91+
//! description(err.description())
92+
//! }
8993
//! }
9094
//! }
9195
//! ```

0 commit comments

Comments
 (0)