From 7746e6f6828ca0d712c0d77089932af47bf77444 Mon Sep 17 00:00:00 2001 From: Alex Ellwein Date: Fri, 8 Dec 2023 12:28:17 +0100 Subject: [PATCH] feat: adapt example in README.md to compile with axum-0.7.* --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1c11fcc..9a3c51d 100644 --- a/README.md +++ b/README.md @@ -52,10 +52,8 @@ async fn main() { .layer(oidc_auth_service) .layer(session_service); - axum::Server::bind(&"[::]:8080".parse().unwrap()) - .serve(app.into_make_service()) - .await - .unwrap(); + let listener = TcpListener::bind("[::]:8080").await.unwrap(); + axum::serve(listener, app.into_make_service()).await.unwrap(); } ```