diff --git a/examples/query-params-with-empty-strings/src/main.rs b/examples/query-params-with-empty-strings/src/main.rs index 18e107b1..4143ac82 100644 --- a/examples/query-params-with-empty-strings/src/main.rs +++ b/examples/query-params-with-empty-strings/src/main.rs @@ -14,7 +14,7 @@ async fn main() { .await .unwrap(); println!("listening on {}", listener.local_addr().unwrap()); - axum::serve(listener, app()).await.unwrap(); + axum::serve(listener, app()).await; } fn app() -> Router { diff --git a/examples/sse/src/main.rs b/examples/sse/src/main.rs index f4ab9e3e..a89f449b 100644 --- a/examples/sse/src/main.rs +++ b/examples/sse/src/main.rs @@ -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) diff --git a/examples/static-file-server/src/main.rs b/examples/static-file-server/src/main.rs index 148af57c..8a244532 100644 --- a/examples/static-file-server/src/main.rs +++ b/examples/static-file-server/src/main.rs @@ -111,7 +111,5 @@ async fn serve(app: Router, port: u16) { let addr = SocketAddr::from(([127, 0, 0, 1], port)); let listener = tokio::net::TcpListener::bind(addr).await.unwrap(); tracing::debug!("listening on {}", listener.local_addr().unwrap()); - axum::serve(listener, app.layer(TraceLayer::new_for_http())) - .await - .unwrap(); + axum::serve(listener, app.layer(TraceLayer::new_for_http())).await; } diff --git a/examples/testing-websockets/src/main.rs b/examples/testing-websockets/src/main.rs index 7a0be11c..fbce040e 100644 --- a/examples/testing-websockets/src/main.rs +++ b/examples/testing-websockets/src/main.rs @@ -21,7 +21,7 @@ async fn main() { .await .unwrap(); println!("listening on {}", listener.local_addr().unwrap()); - axum::serve(listener, app()).await.unwrap(); + axum::serve(listener, app()).await; } fn app() -> Router { diff --git a/examples/testing/src/main.rs b/examples/testing/src/main.rs index c6dbcf5c..c44ec36e 100644 --- a/examples/testing/src/main.rs +++ b/examples/testing/src/main.rs @@ -29,7 +29,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; } /// Having a function that produces our app makes it easy to call it from tests @@ -132,7 +132,7 @@ mod tests { let addr = listener.local_addr().unwrap(); tokio::spawn(async move { - axum::serve(listener, app()).await.unwrap(); + axum::serve(listener, app()).await; }); let client =