Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/walkdir.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs
index ab9b17a..b084a58 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -203,6 +203,7 @@ impl Error {
}
impl error::Error for Error {
+ #[allow(deprecated)]
fn description(&self) -> &str {
match self.inner {
ErrorInner::Io { ref err, .. } => err.description(),
@@ -210,7 +211,11 @@ impl error::Error for Error {
}
}
- fn cause(&self) -> Option<&error::Error> {
+ fn cause(&self) -> Option<&dyn error::Error> {
+ self.source()
+ }
+
+ fn source(&self) -> Option<&(dyn error::Error + 'static)> {
match self.inner {
ErrorInner::Io { ref err, .. } => Some(err),
ErrorInner::Loop { .. } => None,