aboutsummaryrefslogtreecommitdiff
path: root/crates/nres
diff options
context:
space:
mode:
Diffstat (limited to 'crates/nres')
-rw-r--r--crates/nres/src/error.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/crates/nres/src/error.rs b/crates/nres/src/error.rs
index 0a4dbbe..9a3c651 100644
--- a/crates/nres/src/error.rs
+++ b/crates/nres/src/error.rs
@@ -100,4 +100,11 @@ impl fmt::Display for Error {
}
}
-impl std::error::Error for Error {}
+impl std::error::Error for Error {
+ fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
+ match self {
+ Self::Io(err) => Some(err),
+ _ => None,
+ }
+ }
+}