style(lib): apply latest rustfmt

This commit is contained in:
Sean McArthur
2020-02-06 11:41:25 -08:00
parent 141207769f
commit dd02254ae8
7 changed files with 42 additions and 58 deletions

View File

@@ -23,12 +23,12 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let addr1 = ([127, 0, 0, 1], 1337).into();
let addr2 = ([127, 0, 0, 1], 1338).into();
let srv1 = Server::bind(&addr1).serve(make_service_fn(|_| {
async { Ok::<_, hyper::Error>(service_fn(index1)) }
let srv1 = Server::bind(&addr1).serve(make_service_fn(|_| async {
Ok::<_, hyper::Error>(service_fn(index1))
}));
let srv2 = Server::bind(&addr2).serve(make_service_fn(|_| {
async { Ok::<_, hyper::Error>(service_fn(index2)) }
let srv2 = Server::bind(&addr2).serve(make_service_fn(|_| async {
Ok::<_, hyper::Error>(service_fn(index2))
}));
println!("Listening on http://{} and http://{}", addr1, addr2);

View File

@@ -81,8 +81,8 @@ async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let addr = ([127, 0, 0, 1], 1337).into();
let server = Server::bind(&addr).serve(make_service_fn(|_| {
async { Ok::<_, hyper::Error>(service_fn(param_example)) }
let server = Server::bind(&addr).serve(make_service_fn(|_| async {
Ok::<_, hyper::Error>(service_fn(param_example))
}));
println!("Listening on http://{}", addr);