mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-26 00:00:23 +02:00
Remove B type param: Follow ups (#1789)
Co-authored-by: Jonas Platte <[email protected]> Co-authored-by: Michael Scofield <[email protected]>
This commit is contained in:
co-authored by
Jonas Platte
Michael Scofield
parent
72c1b7a80c
commit
6703f8634c
@@ -5,11 +5,7 @@
|
||||
//! ```
|
||||
|
||||
use axum::{
|
||||
body::Body,
|
||||
handler::HandlerWithoutStateExt,
|
||||
http::{Request, StatusCode},
|
||||
routing::get,
|
||||
Router,
|
||||
extract::Request, handler::HandlerWithoutStateExt, http::StatusCode, routing::get, Router,
|
||||
};
|
||||
use std::net::SocketAddr;
|
||||
use tower::ServiceExt;
|
||||
@@ -97,7 +93,7 @@ fn calling_serve_dir_from_a_handler() -> Router {
|
||||
// call `ServeDir` yourself from a handler
|
||||
Router::new().nest_service(
|
||||
"/foo",
|
||||
get(|request: Request<Body>| async {
|
||||
get(|request: Request| async {
|
||||
let service = ServeDir::new("assets");
|
||||
let result = service.oneshot(request).await;
|
||||
result
|
||||
|
||||
Reference in New Issue
Block a user