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/src/crypto/mod.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/src/crypto/mod.rs')
-rw-r--r-- | openpgp/src/crypto/mod.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/openpgp/src/crypto/mod.rs b/openpgp/src/crypto/mod.rs index 6645ecdc..2757dfba 100644 --- a/openpgp/src/crypto/mod.rs +++ b/openpgp/src/crypto/mod.rs @@ -6,8 +6,8 @@ use std::fmt; use nettle::{Random, Yarrow}; -use constants::HashAlgorithm; -use Result; +use crate::constants::HashAlgorithm; +use crate::Result; pub(crate) mod aead; mod asymmetric; @@ -169,8 +169,8 @@ pub fn hash_file<R: Read>(reader: R, algos: &[HashAlgorithm]) { use std::mem; - use ::parse::HashedReader; - use ::parse::HashesFor; + use crate::parse::HashedReader; + use crate::parse::HashesFor; use buffered_reader::BufferedReader; @@ -202,7 +202,7 @@ fn hash_file_test() { ].iter().cloned().collect(); let result = - hash_file(::std::io::Cursor::new(::tests::manifesto()), + hash_file(::std::io::Cursor::new(crate::tests::manifesto()), &expected.keys().cloned().collect::<Vec<HashAlgorithm>>()) .unwrap(); @@ -211,6 +211,6 @@ fn hash_file_test() { hash.digest(&mut digest); assert_eq!(*expected.get(&algo).unwrap(), - &::conversions::to_hex(&digest[..], false)); + &crate::conversions::to_hex(&digest[..], false)); } } |