style(lib): apply latest rustfmt
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user