diff --git a/src/accountant_skel.rs b/src/accountant_skel.rs index 222360e8315acb..8b0b5ccfb9c5d4 100644 --- a/src/accountant_skel.rs +++ b/src/accountant_skel.rs @@ -277,8 +277,11 @@ pub fn to_packets(r: &packet::PacketRecycler, reqs: Vec) -> Vec u8 { use ring::signature; - use untrusted; use signature::{PublicKey, Signature}; + use untrusted; let msg_start = TX_OFFSET + SIGNED_DATA_OFFSET; let sig_start = TX_OFFSET + SIG_OFFSET; @@ -130,12 +130,12 @@ pub fn ed25519_verify(batches: &Vec) -> Vec> { #[cfg(test)] mod tests { - use transaction::test_tx; use accountant_skel::Request; use bincode::serialize; use ecdsa; - use std::sync::RwLock; use packet::{Packet, Packets, SharedPackets}; + use std::sync::RwLock; + use transaction::test_tx; use transaction::Transaction; fn make_packet_from_transaction(tr: Transaction) -> Packet { diff --git a/src/hash.rs b/src/hash.rs index ee7598a0dc29e2..61dd01468c9fcb 100644 --- a/src/hash.rs +++ b/src/hash.rs @@ -1,7 +1,7 @@ //! The `hash` module provides functions for creating SHA-256 hashes. -use generic_array::GenericArray; use generic_array::typenum::U32; +use generic_array::GenericArray; use sha2::{Digest, Sha256}; pub type Hash = GenericArray; diff --git a/src/mint.rs b/src/mint.rs index 2f385914deab0c..f3b6c5e598d635 100644 --- a/src/mint.rs +++ b/src/mint.rs @@ -1,7 +1,7 @@ //! The `mint` module is a library for generating the chain's genesis block. -use entry::Entry; use entry::create_entry; +use entry::Entry; use event::Event; use hash::{hash, Hash}; use ring::rand::SystemRandom; diff --git a/src/result.rs b/src/result.rs index 81a3a66678ea63..9b3c17a3695fde 100644 --- a/src/result.rs +++ b/src/result.rs @@ -70,9 +70,9 @@ mod tests { use std::io; use std::io::Write; use std::net::SocketAddr; + use std::sync::mpsc::channel; use std::sync::mpsc::RecvError; use std::sync::mpsc::RecvTimeoutError; - use std::sync::mpsc::channel; use std::thread; fn addr_parse_error() -> Result { diff --git a/src/signature.rs b/src/signature.rs index 5f3aee61ea2267..1b01e14ef579e8 100644 --- a/src/signature.rs +++ b/src/signature.rs @@ -1,7 +1,7 @@ //! The `signature` module provides functionality for public, and private keys. -use generic_array::GenericArray; use generic_array::typenum::{U32, U64}; +use generic_array::GenericArray; use ring::signature::Ed25519KeyPair; use ring::{rand, signature}; use untrusted; diff --git a/src/streamer.rs b/src/streamer.rs index fad9f5407044ea..9ed4e2d800fbe7 100644 --- a/src/streamer.rs +++ b/src/streamer.rs @@ -2,9 +2,9 @@ use packet::{Blob, BlobRecycler, PacketRecycler, SharedBlob, SharedPackets, NUM_ use result::Result; use std::collections::VecDeque; use std::net::UdpSocket; -use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::mpsc; +use std::sync::Arc; use std::thread::{spawn, JoinHandle}; use std::time::Duration; @@ -246,9 +246,9 @@ mod test { use std::io; use std::io::Write; use std::net::UdpSocket; - use std::sync::Arc; use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::mpsc::channel; + use std::sync::Arc; use std::time::Duration; use streamer::{receiver, responder, window, BlobReceiver, PacketReceiver};