We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9c164f commit 3a2f01cCopy full SHA for 3a2f01c
src/lib.rs
@@ -7,6 +7,7 @@
7
//! ```
8
//! # use std::fs::read_to_string;
9
//! # use std::path::Path;
10
+//! # use std::io;
11
//! #
12
//! use fn_error_context::context;
13
//!
@@ -16,9 +17,14 @@
16
17
//! Ok(text.parse()?)
18
//! }
19
20
+//! let error = parse_config("not-found").unwrap_err();
21
//! assert_eq!(
-//! parse_config("not-found").unwrap_err().to_string(),
-//! "failed to parse config at `not-found`"
22
+//! error.to_string(),
23
+//! "failed to parse config at `not-found`",
24
+//! );
25
+//! assert_eq!(
26
+//! error.source().unwrap().downcast_ref::<io::Error>().unwrap().kind(),
27
+//! io::ErrorKind::NotFound,
28
//! );
29
30
0 commit comments