Remove B type param (#1751)

Co-authored-by: Jonas Platte <[email protected]>
Co-authored-by: Michael Scofield <[email protected]>
This commit is contained in:
David Pedersen
2023-03-23 20:22:35 +01:00
co-authored by Jonas Platte Michael Scofield
parent f902f7470f
commit a4b7d3843c
99 changed files with 947 additions and 1142 deletions
+4 -1
View File
@@ -71,7 +71,10 @@ fn using_serve_dir_with_handler_as_service() -> Router {
(StatusCode::NOT_FOUND, "Not found")
}
let serve_dir = ServeDir::new("assets").not_found_service(handle_404.into_service());
// you can convert handler function to service
let service = handle_404.into_service();
let serve_dir = ServeDir::new("assets").not_found_service(service);
Router::new()
.route("/foo", get(|| async { "Hi from /foo" }))