summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-10-14 11:36:45 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-10-14 12:01:22 +0200
commit57531dbe5b277a46982e4dd2b0ab6c20ebe43682 (patch)
tree9fddc14e92f2da4fd7c99c145d4c7ea76bf6a993
parentea4eaf796404c0fde15509274190cc4668c5d08e (diff)
Replace most 'extern crate' directives with 'use'.
- See #480.
-rw-r--r--buffered-reader/src/lib.rs6
-rw-r--r--core/src/lib.rs4
-rw-r--r--ffi-macros/src/lib.rs10
-rw-r--r--ffi-macros/src/rust2c.rs4
-rw-r--r--ffi/src/error.rs2
-rw-r--r--ffi/src/lib.rs12
-rw-r--r--ffi/src/net.rs3
-rw-r--r--ffi/src/store.rs2
-rw-r--r--ffi/tests/c-tests.rs2
-rw-r--r--ipc/build.rs2
-rw-r--r--ipc/examples/assuan-client.rs6
-rw-r--r--ipc/examples/gpg-agent-client.rs6
-rw-r--r--ipc/examples/gpg-agent-decrypt.rs6
-rw-r--r--ipc/examples/gpg-agent-sign.rs6
-rw-r--r--ipc/src/lib.rs6
-rw-r--r--ipc/tests/gpg-agent.rs6
-rw-r--r--net/src/lib.rs29
-rw-r--r--net/src/wkd.rs5
-rw-r--r--net/tests/hkp.rs18
-rw-r--r--openpgp-ffi/src/amalgamation.rs2
-rw-r--r--openpgp-ffi/src/armor.rs2
-rw-r--r--openpgp-ffi/src/cert.rs2
-rw-r--r--openpgp-ffi/src/common.rs2
-rw-r--r--openpgp-ffi/src/crypto.rs2
-rw-r--r--openpgp-ffi/src/error.rs2
-rw-r--r--openpgp-ffi/src/fingerprint.rs2
-rw-r--r--openpgp-ffi/src/io.rs2
-rw-r--r--openpgp-ffi/src/key_amalgamation.rs2
-rw-r--r--openpgp-ffi/src/keyid.rs2
-rw-r--r--openpgp-ffi/src/lib.rs9
-rw-r--r--openpgp-ffi/src/packet/key.rs2
-rw-r--r--openpgp-ffi/src/packet/literal.rs2
-rw-r--r--openpgp-ffi/src/packet/mod.rs2
-rw-r--r--openpgp-ffi/src/packet/pkesk.rs2
-rw-r--r--openpgp-ffi/src/packet/signature.rs2
-rw-r--r--openpgp-ffi/src/packet/skesk.rs2
-rw-r--r--openpgp-ffi/src/packet/user_attribute.rs2
-rw-r--r--openpgp-ffi/src/packet/userid.rs2
-rw-r--r--openpgp-ffi/src/packet_pile.rs2
-rw-r--r--openpgp-ffi/src/parse/mod.rs2
-rw-r--r--openpgp-ffi/src/parse/stream.rs2
-rw-r--r--openpgp-ffi/src/policy.rs2
-rw-r--r--openpgp-ffi/src/revocation_status.rs2
-rw-r--r--openpgp-ffi/src/serialize.rs2
-rw-r--r--openpgp-ffi/src/tsk.rs2
-rw-r--r--openpgp-ffi/tests/c-tests.rs2
-rw-r--r--openpgp/build.rs2
-rw-r--r--openpgp/src/armor.rs4
-rw-r--r--openpgp/src/cert/amalgamation.rs28
-rw-r--r--openpgp/src/cert/amalgamation/iter.rs10
-rw-r--r--openpgp/src/cert/amalgamation/key.rs46
-rw-r--r--openpgp/src/cert/amalgamation/key/iter.rs42
-rw-r--r--openpgp/src/cert/bundle.rs26
-rw-r--r--openpgp/src/cert/mod.rs4
-rw-r--r--openpgp/src/cert/prelude.rs2
-rw-r--r--openpgp/src/fingerprint.rs4
-rw-r--r--openpgp/src/keyhandle.rs2
-rw-r--r--openpgp/src/keyid.rs4
-rw-r--r--openpgp/src/lib.rs3
-rw-r--r--openpgp/src/message/mod.rs2
-rw-r--r--openpgp/src/packet/container.rs2
-rw-r--r--openpgp/src/packet/prelude.rs2
-rw-r--r--openpgp/src/packet/signature/subpacket.rs4
-rw-r--r--openpgp/src/packet/userid.rs6
-rw-r--r--openpgp/src/packet_pile.rs16
-rw-r--r--openpgp/src/parse/stream.rs2
-rw-r--r--openpgp/src/serialize.rs4
-rw-r--r--openpgp/src/tests.rs2
-rw-r--r--openpgp/tests/for-each-artifact.rs2
-rw-r--r--sqv/build.rs2
-rw-r--r--sqv/src/sqv.rs4
-rw-r--r--sqv/tests/bad-subkey.rs2
-rw-r--r--sqv/tests/duplicate-signatures.rs2
-rw-r--r--sqv/tests/multiple-signatures.rs2
-rw-r--r--sqv/tests/not-before-after.rs2
-rw-r--r--sqv/tests/revoked-key.rs2
-rw-r--r--sqv/tests/wrong-key-flags.rs4
-rw-r--r--store/build.rs2
-rw-r--r--store/src/lib.rs109
-rw-r--r--store/src/server.rs5
-rw-r--r--store/tests/ipc-policy.rs4
-rw-r--r--tool/build.rs2
-rw-r--r--tool/src/commands/decrypt.rs4
-rw-r--r--tool/src/commands/dump.rs2
-rw-r--r--tool/src/commands/inspect.rs2
-rw-r--r--tool/src/commands/mod.rs4
-rw-r--r--tool/src/commands/sign.rs2
-rw-r--r--tool/src/sq.rs20
-rw-r--r--tool/tests/sq-sign.rs6
89 files changed, 270 insertions, 327 deletions
diff --git a/buffered-reader/src/lib.rs b/buffered-reader/src/lib.rs
index 32765d74..1b08e73c 100644
--- a/buffered-reader/src/lib.rs
+++ b/buffered-reader/src/lib.rs
@@ -223,12 +223,6 @@
//! [`BufReader`]: https://doc.rust-lang.org/stable/std/io/struct.BufReader.html
//! [HTTP's chunk transfer encoding]: https://en.wikipedia.org/wiki/Chunked_transfer_encoding
-#[cfg(feature = "compression-deflate")]
-extern crate flate2;
-#[cfg(feature = "compression-bzip2")]
-extern crate bzip2;
-extern crate libc;
-
use std::io;
use std::io::{Error, ErrorKind};
use std::cmp;
diff --git a/core/src/lib.rs b/core/src/lib.rs
index 5db7e6bf..b1b39d2e 100644
--- a/core/src/lib.rs
+++ b/core/src/lib.rs
@@ -18,8 +18,8 @@
/// # }
/// ```
-extern crate dirs;
-extern crate tempfile;
+use dirs;
+use tempfile;
use std::fmt;
use std::io;
diff --git a/ffi-macros/src/lib.rs b/ffi-macros/src/lib.rs
index db37daef..6a3d2386 100644
--- a/ffi-macros/src/lib.rs
+++ b/ffi-macros/src/lib.rs
@@ -5,15 +5,13 @@
use std::collections::HashMap;
use std::io::Write;
-extern crate lazy_static;
use lazy_static::lazy_static;
-extern crate syn;
+use syn;
use syn::parse_quote;
use syn::spanned::Spanned;
-extern crate quote;
-extern crate proc_macro;
-extern crate proc_macro2;
-extern crate sha2;
+use proc_macro;
+use proc_macro2;
+use sha2;
use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
diff --git a/ffi-macros/src/rust2c.rs b/ffi-macros/src/rust2c.rs
index 2e469703..d0e252f5 100644
--- a/ffi-macros/src/rust2c.rs
+++ b/ffi-macros/src/rust2c.rs
@@ -1,6 +1,6 @@
-extern crate syn;
+use syn;
use syn::export::ToTokens;
-extern crate proc_macro2;
+use proc_macro2;
const PREFIX: &'static str = "pgp_";
diff --git a/ffi/src/error.rs b/ffi/src/error.rs
index 26940111..935d4515 100644
--- a/ffi/src/error.rs
+++ b/ffi/src/error.rs
@@ -2,7 +2,7 @@
use std::io;
-extern crate sequoia_openpgp as openpgp;
+use sequoia_openpgp as openpgp;
use sequoia_core as core;
pub use crate::openpgp::error::Status;
diff --git a/ffi/src/lib.rs b/ffi/src/lib.rs
index ab2819ae..45844ded 100644
--- a/ffi/src/lib.rs
+++ b/ffi/src/lib.rs</