Fix compilation errors from updating axum

This commit is contained in:
2024-03-31 12:05:54 -04:00
parent 66c66f3f4f
commit 174b23da1d
2 changed files with 6 additions and 8 deletions

View File

@ -42,10 +42,8 @@ async fn main() {
println!("listening on http://{}", &addr);
axum::Server::bind(&addr)
.serve(app.into_make_service())
.await
.unwrap();
let listener = tokio::net::TcpListener::bind(&addr).await.expect(&format!("Could not bind to {}", &addr));
axum::serve(listener, app.into_make_service()).await.expect("Server failed");
}
#[cfg(not(any(feature = "ssr", feature = "csr")))]