diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-07-09 12:51:10 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-07-15 12:47:53 +0200 |
commit | 775f0c039349335df880d35db7df6c131419f0eb (patch) | |
tree | 2d16928f3a629b7afae95cf1b9d518c5603a9f93 /openpgp-ffi/src/crypto.rs | |
parent | caec575e3c44e6045e29aa452ad31f91d04ec139 (diff) |
Prepare for Rust 2018.
- This is the result of running `cargo fix --edition`, with some
manual adjustments.
- The vast majority of changes merely qualify module paths with
'crate::'.
- Two instances of adding an anonymous pattern to a trait's
function.
- `async` is a keyword in Rust 2018, and hence it needs to be
escaped (e.g. in the case of the net::r#async module).
- The manual adjustments were needed due to various shortcomings of
the analysis employed by `cargo fix`, e.g. unexpanded macros,
procedural macros, lalrpop grammars.
Diffstat (limited to 'openpgp-ffi/src/crypto.rs')
-rw-r--r-- | openpgp-ffi/src/crypto.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/openpgp-ffi/src/crypto.rs b/openpgp-ffi/src/crypto.rs index 19f53859..0e3eff7b 100644 --- a/openpgp-ffi/src/crypto.rs +++ b/openpgp-ffi/src/crypto.rs @@ -12,13 +12,13 @@ use self::openpgp::{ }; use super::packet::key::Key; -use MoveFromRaw; -use MoveIntoRaw; +use crate::MoveFromRaw; +use crate::MoveIntoRaw; /// Holds a session key. /// /// The session key is cleared when dropped. -#[::ffi_wrapper_type(prefix = "pgp_", name = "session_key", +#[crate::ffi_wrapper_type(prefix = "pgp_", name = "session_key", derive = "Clone, Debug, PartialEq")] pub struct SessionKey(openpgp::crypto::SessionKey); @@ -42,7 +42,7 @@ fn pgp_session_key_from_bytes(buf: *const u8, size: size_t) /// Holds a password. /// /// The password is cleared when dropped. -#[::ffi_wrapper_type(prefix = "pgp_", name = "password", +#[crate::ffi_wrapper_type(prefix = "pgp_", name = "password", derive = "Clone, Debug, PartialEq")] pub struct Password(openpgp::crypto::Password); @@ -66,7 +66,7 @@ pub extern "C" fn pgp_signer_free /// Creates a new key pair. #[::sequoia_ffi_macros::extern_fn] #[no_mangle] pub extern "C" fn pgp_key_pair_new - (errp: Option<&mut *mut ::error::Error>, public: *mut Key, + (errp: Option<&mut *mut crate::error::Error>, public: *mut Key, secret: *mut openpgp::packet::key::Unencrypted) -> *mut crypto::KeyPair { |