Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cargo fmt to travis build config #28

Merged
merged 2 commits into from
Jul 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 5 additions & 7 deletions tests/test.rs
Original file line number Diff line number Diff line change
@@ -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");
Expand Down Expand Up @@ -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)
};
}
Expand Down