diff --git a/src/main.rs b/src/main.rs index 78c6b7e..a525e69 100644 --- a/src/main.rs +++ b/src/main.rs @@ -64,12 +64,10 @@ async fn serve(app: Router) { // // Server creation let addr = SocketAddr::from(([0, 0, 0, 0], 3000)); let listener = tokio::net::TcpListener::bind(&addr).await.unwrap(); - axum::serve( - listener, - app.into_make_service_with_connect_info::(), - ) - .await - .unwrap(); + + let service = app.into_make_service_with_connect_info::(); + + axum::serve(listener, service).await.unwrap(); tracing::debug!("listening on http://{}/", addr); }