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.
source
1 parent 19ff902 commit c1304d1Copy full SHA for c1304d1
src/lib.rs
@@ -51,6 +51,7 @@
51
#![warn(missing_docs)]
52
#![warn(broken_intra_doc_links)]
53
54
+use std::error;
55
use std::io;
56
57
/// Global error type for the `forceps` crate, which is used in the `Result` types of all calls to
@@ -84,7 +85,17 @@ impl std::fmt::Display for ForcepError {
84
85
}
86
87
-impl std::error::Error for ForcepError {}
88
+impl error::Error for ForcepError {
89
+ fn source(&self) -> Option<&(dyn error::Error + 'static)> {
90
+ match self {
91
+ Self::Io(e) => Some(e),
92
+ Self::MetaDe(e) => Some(e),
93
+ Self::MetaSer(e) => Some(e),
94
+ Self::MetaDb(e) => Some(e),
95
+ Self::NotFound => None,
96
+ }
97
98
+}
99
100
mod tmp;
101
0 commit comments