mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-23 00:00:15 +02:00
Fix return types of serve futures (#3601)
This commit is contained in:
@@ -39,7 +39,7 @@ async fn main() {
|
||||
.await
|
||||
.unwrap();
|
||||
tracing::debug!("listening on {}", listener.local_addr().unwrap());
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
axum::serve(listener, app).await;
|
||||
}
|
||||
|
||||
fn app() -> Router {
|
||||
@@ -89,7 +89,7 @@ mod tests {
|
||||
// Retrieve the port assigned to us by the OS
|
||||
let port = listener.local_addr().unwrap().port();
|
||||
tokio::spawn(async {
|
||||
axum::serve(listener, app()).await.unwrap();
|
||||
axum::serve(listener, app()).await;
|
||||
});
|
||||
// Returns address (e.g. http://127.0.0.1{random_port})
|
||||
format!("http://{host}:{port}")
|
||||
|
||||
Reference in New Issue
Block a user