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

@@ -337,16 +337,12 @@ fn spawn_server(rt: &mut tokio::runtime::Runtime, opts: &Opts) -> SocketAddr {
.http2_only(opts.http2)
.http2_initial_stream_window_size(opts.http2_stream_window)
.http2_initial_connection_window_size(opts.http2_conn_window)
.serve(make_service_fn(move |_| {
async move {
Ok::<_, hyper::Error>(service_fn(move |req: Request<Body>| {
async move {
let mut req_body = req.into_body();
while let Some(_chunk) = req_body.data().await {}
Ok::<_, hyper::Error>(Response::new(Body::from(body)))
}
}))
}
.serve(make_service_fn(move |_| async move {
Ok::<_, hyper::Error>(service_fn(move |req: Request<Body>| async move {
let mut req_body = req.into_body();
while let Some(_chunk) = req_body.data().await {}
Ok::<_, hyper::Error>(Response::new(Body::from(body)))
}))
}))
});
let addr = srv.local_addr();