diff options
Diffstat (limited to 'src/error.rs')
-rw-r--r-- | src/error.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/error.rs b/src/error.rs index 78c03ef..cd0882f 100644 --- a/src/error.rs +++ b/src/error.rs @@ -185,10 +185,7 @@ impl failure::Fail for Error { fn cause(&self) -> Option<&failure::Fail> { match *self { Error::CallbackError { ref cause, .. } => Some(cause.as_ref()), - // Error::cause simply returns the contained Fail type, which we are already displaying - // and returning the backtrace for, no need to repeat it as the cause. - // When failure 1.0 is released, this can become `err.as_fail.cause()` - Error::ExternalError(ref err) => err.cause().cause(), + Error::ExternalError(ref err) => err.as_fail().cause(), _ => None, } } |