From 939525d5c303d1557c69471f3a8d768ba682b51d Mon Sep 17 00:00:00 2001 From: "Aode (lion)" Date: Sat, 2 Oct 2021 14:54:06 -0500 Subject: [PATCH] Implement StdError for Error --- src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 37ae4d9..41d9687 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -67,6 +67,12 @@ impl std::fmt::Display for Error { } } +impl std::error::Error for Error { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + self.kind.source() + } +} + impl From for Error where ErrorKind: From,