Skip to content

Commit 8b60e48

Browse files
committed
fixed linting issues
1 parent d54cc97 commit 8b60e48

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

examples/transport/src/http_upgrade.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ async fn main() -> anyhow::Result<()> {
2525
async fn http_server(req: Request<Incoming>) -> Result<hyper::Response<String>, hyper::Error> {
2626
tokio::spawn(async move {
2727
if let Err(e) = async {
28-
let upgraded = hyper::upgrade::on(req).await?;
29-
let service = Calculator.serve(TokioIo::new(upgraded)).await?;
30-
service.waiting().await?;
31-
Ok::<(), anyhow::Error>(())
28+
let upgraded = hyper::upgrade::on(req).await?;
29+
let service = Calculator.serve(TokioIo::new(upgraded)).await?;
30+
service.waiting().await?;
31+
Ok::<(), anyhow::Error>(())
3232
}.await {
3333
tracing::error!("Service error: {:?}", e);
3434
}
@@ -41,6 +41,7 @@ async fn http_server(req: Request<Incoming>) -> Result<hyper::Response<String>,
4141
Ok(response)
4242
}
4343

44+
4445
async fn http_client(uri: &str) -> anyhow::Result<RunningService<RoleClient, ()>> {
4546
let tcp_stream = tokio::net::TcpStream::connect(uri).await?;
4647
let (mut s, c) =
@@ -51,7 +52,7 @@ async fn http_client(uri: &str) -> anyhow::Result<RunningService<RoleClient, ()>
5152
.insert(UPGRADE, HeaderValue::from_static("mcp"));
5253
let response = s.send_request(req).await?;
5354
let upgraded = hyper::upgrade::on(response).await?;
54-
let client = RoleClient.serve(TokioIo::new(upgraded)).await?;
55+
let client = ().serve(TokioIo::new(upgraded)).await?;
5556
Ok(client)
5657
}
5758

0 commit comments

Comments
 (0)