From 6287c0bfb1cc8e524fcf67f64f15af5fa73b1eac Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Thu, 7 Jun 2018 14:54:33 +0200 Subject: [PATCH] Apply formatting changes from newer cargo fmt --- src/conn_state.rs | 2 +- src/crypto.rs | 5 +++-- src/http/client.rs | 2 +- src/server.rs | 5 +++-- src/tls.rs | 3 ++- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/conn_state.rs b/src/conn_state.rs index 7fcfc3c67..cb7c9f1cd 100644 --- a/src/conn_state.rs +++ b/src/conn_state.rs @@ -419,8 +419,8 @@ const IPV6_MIN_MTU: usize = 1232; #[cfg(test)] pub mod tests { - use super::{ClientTransportParameters, ConnectionId, ServerTransportParameters}; use super::{tls, ConnectionState, PartialDecode, Secret}; + use super::{ClientTransportParameters, ConnectionId, ServerTransportParameters}; use std::sync::Arc; #[test] diff --git a/src/crypto.rs b/src/crypto.rs index b70435905..990179645 100644 --- a/src/crypto.rs +++ b/src/crypto.rs @@ -3,7 +3,8 @@ use bytes::{Buf, BufMut}; use std::fmt; use std::io::Cursor; -use ring::{digest, hkdf, aead::{self, OpeningKey, SealingKey}}; +use ring::aead::{self, OpeningKey, SealingKey}; +use ring::{digest, hkdf}; pub use ring::aead::AES_128_GCM; pub use ring::digest::SHA256; @@ -175,7 +176,7 @@ mod tests { let hs_cid = ConnectionId { len: 8, bytes: [ - 0x83, 0x94, 0xc8, 0xf0, 0x3e, 0x51, 0x57, 0x08, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + 0x83, 0x94, 0xc8, 0xf0, 0x3e, 0x51, 0x57, 0x08, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; let client_handshake_secret = super::expanded_handshake_secret(hs_cid, b"client hs"); diff --git a/src/http/client.rs b/src/http/client.rs index f52e9f557..8765ec934 100644 --- a/src/http/client.rs +++ b/src/http/client.rs @@ -1,7 +1,7 @@ use futures::future::Future; -use QuicError; use streams::Streams; +use QuicError; pub fn start(streams: Streams) -> impl Future { println!("REQUEST STREAM 2"); diff --git a/src/server.rs b/src/server.rs index 90f5e6589..6c241872d 100644 --- a/src/server.rs +++ b/src/server.rs @@ -1,4 +1,5 @@ -use futures::{Async, AsyncSink, Future, Poll, Sink, Stream, sync::mpsc::{self, Receiver, Sender}}; +use futures::sync::mpsc::{self, Receiver, Sender}; +use futures::{Async, AsyncSink, Future, Poll, Sink, Stream}; use super::{QuicError, QuicResult}; use conn_state::ConnectionState; @@ -8,7 +9,7 @@ use parameters::ServerTransportParameters; use tls; use types::ConnectionId; -use std::collections::{HashMap, hash_map::Entry}; +use std::collections::{hash_map::Entry, HashMap}; use std::net::{SocketAddr, ToSocketAddrs}; use std::sync::Arc; diff --git a/src/tls.rs b/src/tls.rs index 85d4f6e6f..3c05cdac9 100644 --- a/src/tls.rs +++ b/src/tls.rs @@ -136,7 +136,8 @@ pub(crate) mod tests { extern crate untrusted; use self::untrusted::Input; use rustls::internal::pemfile; - use std::{fs::File, io::{BufReader, Read}}; + use std::fs::File; + use std::io::{BufReader, Read}; use webpki; pub fn client_config() -> super::ClientConfig {