Implement StdError for Error

This commit is contained in:
Aode (lion) 2021-10-02 14:54:06 -05:00
parent e9910a4b6e
commit 939525d5c3

View file

@ -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<T> From<T> for Error
where
ErrorKind: From<T>,