Skip to content

Commit dc1b3b2

Browse files
authored
Merge pull request #28 from Atul9/add-cargo-fmt-to-travis-config
Add cargo fmt to travis build config
2 parents 321ee87 + 6b2d3bd commit dc1b3b2

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ matrix:
1313
os: osx
1414

1515
script:
16+
- |
17+
if [[ "$TRAVIS_RUST_VERSION" == stable ]]
18+
then
19+
rustup component add rustfmt
20+
cargo fmt --all -- --check
21+
fi
1622
- cargo test
1723
- cargo test --features early-data
1824
- cd examples/server

tests/test.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
use async_std::net::{TcpListener, TcpStream};
2-
use async_std::task;
31
use async_std::io;
4-
use async_std::sync::channel;
2+
use async_std::net::{TcpListener, TcpStream};
53
use async_std::prelude::*;
4+
use async_std::sync::channel;
5+
use async_std::task;
66
use async_tls::{TlsAcceptor, TlsConnector};
77
use lazy_static::lazy_static;
88
use rustls::internal::pemfile::{certs, rsa_private_keys};
99
use rustls::{ClientConfig, ServerConfig};
10-
use std::net::SocketAddr;
1110
use std::io::{BufReader, Cursor};
11+
use std::net::SocketAddr;
1212
use std::sync::Arc;
1313

1414
const CERT: &str = include_str!("end.cert");
@@ -49,9 +49,7 @@ lazy_static! {
4949
Ok(()) as io::Result<()>
5050
});
5151

52-
let addr = task::block_on(async move {
53-
recv.recv().await.unwrap()
54-
});
52+
let addr = task::block_on(async move { recv.recv().await.unwrap() });
5553
(addr, "localhost", CHAIN)
5654
};
5755
}

0 commit comments

Comments
 (0)