Skip to content

Commit ebc60b4

Browse files
committed
Some indent params and ran the formatter.
1 parent 8f6d306 commit ebc60b4

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

rustfmt.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
tab_spaces = 2
22
hard_tabs = false
33
max_width = 120
4+
use_small_heuristics = "Max"
5+
fn_params_layout = "Compressed"

step02_httpserver/code/src/main.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
use axum::{routing::get, Router, serve};
1+
use axum::{routing::get, serve, Router};
22
use std::net::SocketAddr;
3-
use tokio::{net::TcpListener, sync::mpsc};
43
use tokio::signal::unix::{signal, SignalKind};
4+
use tokio::{net::TcpListener, sync::mpsc};
55

66
#[tokio::main]
77
async fn main() {
@@ -11,14 +11,15 @@ async fn main() {
1111
.route("/healthz", get(|| async { "OK\n" }))
1212
.route("/", get(|| async { "hello this is a rust http server\n" }))
1313
.route(
14-
"/quit",
15-
get({
16-
let shutdown_tx = shutdown_tx.clone();
17-
|| async move {
18-
let _ = shutdown_tx.send(()).await;
19-
"yes i am shutting down\n"
20-
}
21-
}));
14+
"/quit",
15+
get({
16+
let shutdown_tx = shutdown_tx.clone();
17+
|| async move {
18+
let _ = shutdown_tx.send(()).await;
19+
"yes i am shutting down\n"
20+
}
21+
}),
22+
);
2223

2324
let addr = SocketAddr::from(([0, 0, 0, 0], 3000));
2425
let listener = TcpListener::bind(addr).await.unwrap();

0 commit comments

Comments
 (0)