summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkyren <kerriganw@gmail.com>2018-06-29 01:24:28 -0400
committerkyren <kerriganw@gmail.com>2018-06-29 01:24:28 -0400
commit02bc8da203f07b029baa2f7cf7ad9825ef7488cd (patch)
tree761c794653e1e69f9d9e4b881d04c271340f74d5 /src
parent31fa9173ae67628df7b7eaad4610263220d3a2f6 (diff)
downloadmlua-02bc8da203f07b029baa2f7cf7ad9825ef7488cd.zip
Prepare for 0.14.0 release
Diffstat (limited to 'src')
-rw-r--r--src/error.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/error.rs b/src/error.rs
index cd0882f..78c03ef 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -185,7 +185,10 @@ impl failure::Fail for Error {
fn cause(&self) -> Option<&failure::Fail> {
match *self {
Error::CallbackError { ref cause, .. } => Some(cause.as_ref()),
- Error::ExternalError(ref err) => err.as_fail().cause(),
+ // 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(),
_ => None,
}
}