Skip to content

Commit 6902b70

Browse files
committed
cargo fmt for examples
1 parent 0351026 commit 6902b70

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

examples/fuse-attack/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ async fn main() {
1717
let router = Router::new()
1818
.get(hello)
1919
.push(Router::with_path("你好").get(hello_zh));
20-
println!("{:?}", router);
20+
println!("{router:?}");
2121
Server::new(acceptor)
2222
.fuse_factory(salvo::fuse::flex::FlexFactory::new())
2323
.serve(router)

examples/hello/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async fn main() {
2828
.push(Router::with_path("你好").get(hello_zh));
2929

3030
// Print router structure for debugging
31-
println!("{:?}", router);
31+
println!("{router:?}");
3232

3333
// Start serving requests
3434
Server::new(acceptor).serve(router).await;

examples/oapi-generics/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ struct MyObject<T: ToSchema + std::fmt::Debug + 'static> {
1111
/// Use string type, this will add to openapi doc.
1212
#[endpoint]
1313
async fn use_string(body: JsonBody<MyObject<String>>) -> String {
14-
format!("{:?}", body)
14+
format!("{body:?}")
1515
}
1616

1717
/// Use i32 type, this will add to openapi doc.
1818
#[endpoint]
1919
async fn use_i32(body: JsonBody<MyObject<i32>>) -> String {
20-
format!("{:?}", body)
20+
format!("{body:?}")
2121
}
2222

2323
/// Use u64 type, this will add to openapi doc.
2424
#[endpoint]
2525
async fn use_u64(body: JsonBody<MyObject<u64>>) -> String {
26-
format!("{:?}", body)
26+
format!("{body:?}")
2727
}
2828

2929
#[tokio::main]

examples/proxy-react-app/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ async fn main() {
99
vec!["http://localhost:3000"],
1010
HyperClient::default(),
1111
));
12-
println!("{:?}", router);
12+
println!("{router:?}");
1313

1414
let acceptor = TcpListener::new("0.0.0.0:5800").bind().await;
1515
Server::new(acceptor).serve(router).await;

examples/proxy-websocket/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ async fn main() {
99
vec!["http://localhost:5800"],
1010
HyperClient::default(),
1111
));
12-
println!("{:?}", router);
12+
println!("{router:?}");
1313
tracing::info!("Run `cargo run --bin example-websocket-chat` to start websocket chat server");
1414
let acceptor = TcpListener::new("0.0.0.0:8888").bind().await;
1515
Server::new(acceptor).serve(router).await;

0 commit comments

Comments
 (0)