summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse/mpis.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-07-09 12:51:10 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-07-15 12:47:53 +0200
commit775f0c039349335df880d35db7df6c131419f0eb (patch)
tree2d16928f3a629b7afae95cf1b9d518c5603a9f93 /openpgp/src/parse/mpis.rs
parentcaec575e3c44e6045e29aa452ad31f91d04ec139 (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/parse/mpis.rs')
-rw-r--r--openpgp/src/parse/mpis.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/openpgp/src/parse/mpis.rs b/openpgp/src/parse/mpis.rs
index b20f11c8..4e0718b8 100644
--- a/openpgp/src/parse/mpis.rs
+++ b/openpgp/src/parse/mpis.rs
@@ -1,16 +1,16 @@
//! Functions for parsing MPIs.
use std::io::Read;
-use {
+use crate::{
Result,
Error,
PublicKeyAlgorithm,
SymmetricAlgorithm,
HashAlgorithm,
};
-use constants::Curve;
-use crypto::mpis::{self, MPI};
-use parse::{
+use crate::constants::Curve;
+use crate::crypto::mpis::{self, MPI};
+use crate::parse::{
PacketHeaderParser,
Cookie,
};
@@ -43,7 +43,7 @@ impl mpis::PublicKey {
php: &mut PacketHeaderParser<'a>)
-> Result<Self>
{
- use PublicKeyAlgorithm::*;
+ use crate::PublicKeyAlgorithm::*;
#[allow(deprecated)]
match algo {
@@ -151,7 +151,7 @@ impl mpis::SecretKey {
pub fn parse_chksumd<T: Read>(algo: PublicKeyAlgorithm, cur: T)
-> Result<Self> {
use std::io::Cursor;
- use serialize::Serialize;
+ use crate::serialize::Serialize;
// read mpis
let bio = buffered_reader::Generic::with_cookie(
@@ -205,7 +205,7 @@ impl mpis::SecretKey {
php: &mut PacketHeaderParser<'a>)
-> Result<Self>
{
- use PublicKeyAlgorithm::*;
+ use crate::PublicKeyAlgorithm::*;
#[allow(deprecated)]
match algo {
@@ -305,7 +305,7 @@ impl mpis::Ciphertext {
pub(crate) fn _parse<'a>(algo: PublicKeyAlgorithm,
php: &mut PacketHeaderParser<'a>)
-> Result<Self> {
- use PublicKeyAlgorithm::*;
+ use crate::PublicKeyAlgorithm::*;
#[allow(deprecated)]
match algo {
@@ -386,7 +386,7 @@ impl mpis::Signature {
pub(crate) fn _parse<'a>(algo: PublicKeyAlgorithm,
php: &mut PacketHeaderParser<'a>)
-> Result<Self> {
- use PublicKeyAlgorithm::*;
+ use crate::PublicKeyAlgorithm::*;
#[allow(deprecated)]
match algo {
@@ -469,7 +469,7 @@ impl mpis::Signature {
#[test]
fn mpis_parse_test() {
use super::Parse;
- use PublicKeyAlgorithm::*;
+ use crate::PublicKeyAlgorithm::*;
// Dummy RSA public key.
{