Use git dependency on failure 1.0 for right now
This commit is contained in:
parent
8b9ab3d031
commit
5aa22de68e
|
@ -26,7 +26,7 @@ builtin-lua = ["cc"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
libc = { version = "0.2" }
|
libc = { version = "0.2" }
|
||||||
failure = { version = "0.1.1" }
|
failure = { git = "https://github.com/rust-lang-nursery/failure", version = "1.0" }
|
||||||
compiletest_rs = { version = "0.3", optional = true }
|
compiletest_rs = { version = "0.3", optional = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
|
@ -185,9 +185,7 @@ impl failure::Fail for Error {
|
||||||
fn cause(&self) -> Option<&failure::Fail> {
|
fn cause(&self) -> Option<&failure::Fail> {
|
||||||
match *self {
|
match *self {
|
||||||
Error::CallbackError { ref cause, .. } => Some(cause.as_ref()),
|
Error::CallbackError { ref cause, .. } => Some(cause.as_ref()),
|
||||||
// Error::cause simply returns the contained Fail type, which we are already displaying
|
Error::ExternalError(ref err) => err.as_fail().cause(),
|
||||||
// and returning the backtrace for, no need to repeat it as the cause.
|
|
||||||
Error::ExternalError(ref err) => err.cause().cause(),
|
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue