summaryrefslogtreecommitdiffstats
path: root/net
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 /net
parentea4eaf796404c0fde15509274190cc4668c5d08e (diff)
Replace most 'extern crate' directives with 'use'.
- See #480.
Diffstat (limited to 'net')
-rw-r--r--net/src/lib.rs29
-rw-r--r--net/src/wkd.rs5
-rw-r--r--net/tests/hkp.rs18
3 files changed, 22 insertions, 30 deletions
diff --git a/net/src/lib.rs b/net/src/lib.rs
index b339daf9..64b3e3e0 100644
--- a/net/src/lib.rs
+++ b/net/src/lib.rs
@@ -14,10 +14,8 @@
//! [SKS keyserver]: https://www.sks-keyservers.net/overview-of-pools.php#pool_hkps
//!
//! ```no_run
-//! # extern crate tokio_core;
-//! # extern crate sequoia_openpgp as openpgp;
-//! # extern crate sequoia_core;
-//! # extern crate sequoia_net;
+//! # use tokio_core;
+//! # use sequoia_openpgp as openpgp;
//! # use openpgp::KeyID;
//! # use sequoia_core::Context;
//! # use sequoia_net::{KeyServer, Result};
@@ -35,19 +33,16 @@
#![warn(missing_docs)]
-extern crate sequoia_openpgp as openpgp;
-extern crate sequoia_core;
-
-extern crate futures;
-extern crate http;
-extern crate hyper;
-extern crate hyper_tls;
-extern crate native_tls;
-extern crate tokio_core;
-extern crate tokio_io;
-extern crate percent_encoding;
-extern crate url;
-extern crate zbase32;
+use sequoia_openpgp as openpgp;
+use sequoia_core;
+
+use futures;
+use http;
+use hyper;
+use hyper_tls;
+use native_tls;
+use percent_encoding;
+use url;
use futures::{future, Future, Stream};
use hyper::client::{ResponseFuture, HttpConnector};
diff --git a/net/src/wkd.rs b/net/src/wkd.rs
index 07f322bc..53ecdfb5 100644
--- a/net/src/wkd.rs
+++ b/net/src/wkd.rs
@@ -14,8 +14,6 @@
// XXX: We might want to merge the 2 structs in the future and move the
// functions to methods.
-extern crate tempfile;
-extern crate tokio_core;
use std::collections::HashMap;
use std::fmt;
@@ -29,6 +27,7 @@ use hyper_tls::HttpsConnector;
use url;
use crate::openpgp::{
+ self,
Fingerprint,
Cert,
};
@@ -265,9 +264,7 @@ fn parse_body<S: AsRef<str>>(body: &[u8], email_address: S)
/// # Example
///
/// ```no_run
-/// extern crate tokio_core;
/// use tokio_core::reactor::Core;
-/// extern crate sequoia_net;
/// use sequoia_net::wkd;
///
/// let email_address = "foo@bar.baz";
diff --git a/net/tests/hkp.rs b/net/tests/hkp.rs
index e095213d..ff41d9a8 100644
--- a/net/tests/hkp.rs
+++ b/net/tests/hkp.rs
@@ -1,9 +1,9 @@
-extern crate futures;
-extern crate http;
-extern crate hyper;
-extern crate rand;
-extern crate tokio_core;
-extern crate url;
+use futures;
+use http;
+use hyper;
+use rand;
+use tokio_core;
+use url;
use futures::Stream;
use futures::future::Future;
@@ -20,9 +20,9 @@ use std::net::{SocketAddr, IpAddr, Ipv4Addr};
use std::thread;
use tokio_core::reactor::Core;
-extern crate sequoia_openpgp as openpgp;
-extern crate sequoia_core;
-extern crate sequoia_net;
+use sequoia_openpgp as openpgp;
+use sequoia_core;
+use sequoia_net;
use crate::openpgp::armor::Reader;
use crate::openpgp::Cert;