diff options
Diffstat (limited to 'tool')
-rw-r--r-- | tool/build.rs | 2 | ||||
-rw-r--r-- | tool/src/commands/decrypt.rs | 4 | ||||
-rw-r--r-- | tool/src/commands/dump.rs | 2 | ||||
-rw-r--r-- | tool/src/commands/inspect.rs | 2 | ||||
-rw-r--r-- | tool/src/commands/mod.rs | 4 | ||||
-rw-r--r-- | tool/src/commands/sign.rs | 2 | ||||
-rw-r--r-- | tool/src/sq.rs | 20 | ||||
-rw-r--r-- | tool/tests/sq-sign.rs | 6 |
8 files changed, 18 insertions, 24 deletions
diff --git a/tool/build.rs b/tool/build.rs index d4b6bf6e..b7d3147d 100644 --- a/tool/build.rs +++ b/tool/build.rs @@ -1,4 +1,4 @@ -extern crate clap; +use clap; use std::env; use std::fs; diff --git a/tool/src/commands/decrypt.rs b/tool/src/commands/decrypt.rs index d7657cdb..07adabe6 100644 --- a/tool/src/commands/decrypt.rs +++ b/tool/src/commands/decrypt.rs @@ -4,7 +4,7 @@ use std::collections::HashMap; use std::io; use rpassword; -extern crate sequoia_openpgp as openpgp; +use sequoia_openpgp as openpgp; use sequoia_core::Context; use crate::openpgp::types::SymmetricAlgorithm; use crate::openpgp::fmt::hex; @@ -21,7 +21,7 @@ use crate::openpgp::parse::stream::{ VerificationHelper, DecryptionHelper, DecryptorBuilder, MessageStructure, }; use crate::openpgp::policy::Policy; -extern crate sequoia_store as store; +use sequoia_store as store; use super::{dump::PacketDumper, VHelper}; diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs index 764c14f0..6f35f56d 100644 --- a/tool/src/commands/dump.rs +++ b/tool/src/commands/dump.rs @@ -1,6 +1,6 @@ use std::io::{self, Read}; -extern crate sequoia_openpgp as openpgp; +use sequoia_openpgp as openpgp; use self::openpgp::types::{Duration, Timestamp, SymmetricAlgorithm}; use self::openpgp::fmt::hex; use self::openpgp::crypto::mpi; diff --git a/tool/src/commands/inspect.rs b/tool/src/commands/inspect.rs index 52ef375b..e275c261 100644 --- a/tool/src/commands/inspect.rs +++ b/tool/src/commands/inspect.rs @@ -3,7 +3,7 @@ use std::io::{self, Read}; use clap; -extern crate sequoia_openpgp as openpgp; +use sequoia_openpgp as openpgp; use crate::openpgp::{KeyHandle, Packet, Result}; use crate::openpgp::cert::prelude::*; use openpgp::packet::{ diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs index 04e84987..6415e2cf 100644 --- a/tool/src/commands/mod.rs +++ b/tool/src/commands/mod.rs @@ -6,7 +6,7 @@ use std::io::{self, Write}; use std::time::SystemTime; use rpassword; -extern crate sequoia_openpgp as openpgp; +use sequoia_openpgp as openpgp; use sequoia_core::Context; use crate::openpgp::types::{ CompressionAlgorithm, @@ -29,7 +29,7 @@ use crate::openpgp::serialize::stream::{ }, }; use crate::openpgp::policy::Policy; -extern crate sequoia_store as store; +use sequoia_store as store; pub mod decrypt; pub use self::decrypt::decrypt; diff --git a/tool/src/commands/sign.rs b/tool/src/commands/sign.rs index 9bc2af4d..41691af0 100644 --- a/tool/src/commands/sign.rs +++ b/tool/src/commands/sign.rs @@ -5,7 +5,7 @@ use std::path::PathBuf; use std::time::SystemTime; use tempfile::NamedTempFile; -extern crate sequoia_openpgp as openpgp; +use sequoia_openpgp as openpgp; use crate::openpgp::armor; use crate::openpgp::{Packet, Result}; use crate::openpgp::packet::Signature; diff --git a/tool/src/sq.rs b/tool/src/sq.rs index a060f1c5..31107e93 100644 --- a/tool/src/sq.rs +++ b/tool/src/sq.rs @@ -1,17 +1,11 @@ /// A command-line frontend for Sequoia. -extern crate clap; -#[macro_use] -extern crate prettytable; -extern crate rpassword; -extern crate tempfile; -extern crate crossterm; -extern crate itertools; -extern crate tokio_core; +use crossterm; +use tokio_core; use crossterm::terminal; use anyhow::Context as _; -use prettytable::{Table, Cell, Row}; +use prettytable::{Table, Cell, Row, row, cell}; use std::fs::OpenOptions; use std::io::{self, Write}; use std::path::{Path, PathBuf}; @@ -19,10 +13,10 @@ use std::process::exit; use chrono::{DateTime, offset::Utc}; use buffered_reader::File; -extern crate sequoia_openpgp as openpgp; -extern crate sequoia_core; -extern crate sequoia_net; -extern crate sequoia_store as store; +use sequoia_openpgp as openpgp; +use sequoia_core; +use sequoia_net; +use sequoia_store as store; use crate::openpgp::Result; use crate::openpgp::{armor, Cert}; diff --git a/tool/tests/sq-sign.rs b/tool/tests/sq-sign.rs index 1b1ff820..f75d5b9e 100644 --- a/tool/tests/sq-sign.rs +++ b/tool/tests/sq-sign.rs @@ -1,12 +1,12 @@ use std::fs::{self, File}; use std::io; -extern crate assert_cli; +use assert_cli; use assert_cli::Assert; -extern crate tempfile; +use tempfile; use tempfile::TempDir; -extern crate sequoia_openpgp as openpgp; +use sequoia_openpgp as openpgp; use crate::openpgp::{Packet, PacketPile, Cert}; use crate::openpgp::crypto::KeyPair; use crate::openpgp::packet::key::SecretKeyMaterial; |