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-04-21 17:45:31 +02:00
co-authored by Jonas Platte Michael Scofield
parent 9be0ea934c
commit 4e4c29175f
100 changed files with 966 additions and 1160 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" }))