diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-03-09 11:42:45 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-03-09 18:09:50 +0100 |
commit | 391a4b92c977cd64dfd131f3e29b0bc8d756d064 (patch) | |
tree | b5b96ff935853cef9ee22e01890c248a791e724e /openpgp-ffi/src/packet | |
parent | 58d662c6d37dd1b0dccd4d0ce30290b8ede408e9 (diff) |
Switch from failure to anyhow.
- Use the anyhow crate instead of failure to implement the dynamic
side of our error handling. anyhow::Error derefs to dyn
std::error::Error, allowing better interoperability with other
stdlib-based error handling libraries.
- Fixes #444.
Diffstat (limited to 'openpgp-ffi/src/packet')
-rw-r--r-- | openpgp-ffi/src/packet/pkesk.rs | 3 | ||||
-rw-r--r-- | openpgp-ffi/src/packet/skesk.rs | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/openpgp-ffi/src/packet/pkesk.rs b/openpgp-ffi/src/packet/pkesk.rs index 50845fe8..a00c4ff0 100644 --- a/openpgp-ffi/src/packet/pkesk.rs +++ b/openpgp-ffi/src/packet/pkesk.rs @@ -1,6 +1,5 @@ //! Asymmetrically encrypted session keys. -use failure; use libc::size_t; extern crate sequoia_openpgp as openpgp; @@ -61,7 +60,7 @@ pub extern "C" fn pgp_pkesk_decrypt(errp: Option<&mut *mut crate::error::Error>, *key_len = k.len(); Status::Success }, - Err(e) => ffi_try_status!(Err::<(), failure::Error>(e)), + Err(e) => ffi_try_status!(Err::<(), anyhow::Error>(e)), } }, Err(e) => { diff --git a/openpgp-ffi/src/packet/skesk.rs b/openpgp-ffi/src/packet/skesk.rs index 95b276a5..cf4ba297 100644 --- a/openpgp-ffi/src/packet/skesk.rs +++ b/openpgp-ffi/src/packet/skesk.rs @@ -3,7 +3,6 @@ use std::slice; use libc::size_t; -use failure; extern crate sequoia_openpgp as openpgp; use super::Packet; @@ -47,7 +46,7 @@ pub extern "C" fn pgp_skesk_decrypt(errp: Option<&mut *mut crate::error::Error>, *key_len = k.len(); Status::Success }, - Err(e) => ffi_try_status!(Err::<(), failure::Error>(e)), + Err(e) => ffi_try_status!(Err::<(), anyhow::Error>(e)), } } else { panic!("Not a SKESK packet"); |