summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkyren <kerriganw@gmail.com>2018-08-05 11:48:25 -0400
committerkyren <kerriganw@gmail.com>2018-08-05 11:48:25 -0400
commit83669603687358c0bed59405aac6660b0967fe10 (patch)
tree1ca7583c80afdf0d1362a9e1755078a6209181cf
parent2e1bdb64c0ff9855f8769a1673dd5c2c7cd2c872 (diff)
downloadmlua-83669603687358c0bed59405aac6660b0967fe10.zip
Update to failure 0.1.2, rename deprecated methods
-rw-r--r--Cargo.toml2
-rw-r--r--src/error.rs5
2 files changed, 2 insertions, 5 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 5e6ed59..4386443 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -26,7 +26,7 @@ builtin-lua = ["cc"]
[dependencies]
libc = { version = "0.2" }
-failure = { version = "0.1.1" }
+failure = { version = "0.1.2" }
compiletest_rs = { version = "0.3", optional = true }
[build-dependencies]
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,
}
}