diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-10-14 11:36:45 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-10-14 12:01:22 +0200 |
commit | 57531dbe5b277a46982e4dd2b0ab6c20ebe43682 (patch) | |
tree | 9fddc14e92f2da4fd7c99c145d4c7ea76bf6a993 /openpgp/src/packet | |
parent | ea4eaf796404c0fde15509274190cc4668c5d08e (diff) |
Replace most 'extern crate' directives with 'use'.
- See #480.
Diffstat (limited to 'openpgp/src/packet')
-rw-r--r-- | openpgp/src/packet/container.rs | 2 | ||||
-rw-r--r-- | openpgp/src/packet/prelude.rs | 2 | ||||
-rw-r--r-- | openpgp/src/packet/signature/subpacket.rs | 4 | ||||
-rw-r--r-- | openpgp/src/packet/userid.rs | 6 |
4 files changed, 7 insertions, 7 deletions
diff --git a/openpgp/src/packet/container.rs b/openpgp/src/packet/container.rs index bd404a44..29a40d9b 100644 --- a/openpgp/src/packet/container.rs +++ b/openpgp/src/packet/container.rs @@ -282,7 +282,7 @@ impl Container { /// Returns the hash for the empty body. fn empty_body_digest() -> Vec<u8> { - lazy_static!{ + lazy_static::lazy_static!{ static ref DIGEST: Vec<u8> = { let mut h = Container::make_body_hash(); let mut d = vec![0; h.digest_size()]; diff --git a/openpgp/src/packet/prelude.rs b/openpgp/src/packet/prelude.rs index c0df4d78..91c5f53b 100644 --- a/openpgp/src/packet/prelude.rs +++ b/openpgp/src/packet/prelude.rs @@ -17,7 +17,7 @@ //! //! ``` //! # #![allow(unused_imports)] -//! # extern crate sequoia_openpgp as openpgp; +//! # use sequoia_openpgp as openpgp; //! use openpgp::packet::prelude::*; //! ``` diff --git a/openpgp/src/packet/signature/subpacket.rs b/openpgp/src/packet/signature/subpacket.rs index 58593709..42430a4f 100644 --- a/openpgp/src/packet/signature/subpacket.rs +++ b/openpgp/src/packet/signature/subpacket.rs @@ -30,7 +30,7 @@ //! Print any Issuer Fingerprint subpackets: //! //! ```rust -//! # extern crate sequoia_openpgp as openpgp; +//! # use sequoia_openpgp as openpgp; //! # use openpgp::Result; //! # use openpgp::Packet; //! # use openpgp::parse::{Parse, PacketParserResult, PacketParser}; @@ -96,7 +96,7 @@ use crate::types::{ Timestamp, }; -lazy_static!{ +lazy_static::lazy_static!{ /// The default amount of tolerance to use when comparing /// some timestamps. /// diff --git a/openpgp/src/packet/userid.rs b/openpgp/src/packet/userid.rs index 63426e22..139f3cff 100644 --- a/openpgp/src/packet/userid.rs +++ b/openpgp/src/packet/userid.rs @@ -59,7 +59,7 @@ impl ConventionallyParsedUserID { } fn parse(userid: String) -> Result<Self> { - lazy_static!{ + lazy_static::lazy_static!{ static ref USER_ID_PARSER: Regex = { // Whitespace. let ws_bare = " "; @@ -696,7 +696,7 @@ impl UserID { /// [conventional User ID]: #conventional-user-ids /// /// ``` - /// # extern crate sequoia_openpgp as openpgp; + /// # use sequoia_openpgp as openpgp; /// # use openpgp::packet::UserID; /// assert_eq!(UserID::from_address( /// "John Smith".into(), @@ -729,7 +729,7 @@ impl UserID { /// [conventional User ID]: #conventional-user-ids /// /// ``` - /// # extern crate sequoia_openpgp as openpgp; + /// # use sequoia_openpgp as openpgp; /// # use openpgp::packet::UserID; /// assert_eq!(UserID::from_unchecked_address( /// "NAS".into(), |