diff --git a/.travis.yml b/.travis.yml index 9efee9d..1acf8cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,12 @@ matrix: os: osx script: + - | + if [[ "$TRAVIS_RUST_VERSION" == stable ]] + then + rustup component add rustfmt + cargo fmt --all -- --check + fi - cargo test - cargo test --features early-data - cd examples/server diff --git a/tests/test.rs b/tests/test.rs index d7871ba..d0f4ffa 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -1,14 +1,14 @@ -use async_std::net::{TcpListener, TcpStream}; -use async_std::task; use async_std::io; -use async_std::sync::channel; +use async_std::net::{TcpListener, TcpStream}; use async_std::prelude::*; +use async_std::sync::channel; +use async_std::task; use async_tls::{TlsAcceptor, TlsConnector}; use lazy_static::lazy_static; use rustls::internal::pemfile::{certs, rsa_private_keys}; use rustls::{ClientConfig, ServerConfig}; -use std::net::SocketAddr; use std::io::{BufReader, Cursor}; +use std::net::SocketAddr; use std::sync::Arc; const CERT: &str = include_str!("end.cert"); @@ -49,9 +49,7 @@ lazy_static! { Ok(()) as io::Result<()> }); - let addr = task::block_on(async move { - recv.recv().await.unwrap() - }); + let addr = task::block_on(async move { recv.recv().await.unwrap() }); (addr, "localhost", CHAIN) }; }