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:
David Pedersen
2023-04-21 17:45:31 +02:00
co-authored by Jonas Platte Michael Scofield
parent 72c1b7a80c
commit 6703f8634c
70 changed files with 429 additions and 531 deletions
+4 -4
View File
@@ -5,9 +5,9 @@
//! ```
use axum::{
body::{Body, Bytes},
extract::{Multipart, Path},
http::{Request, StatusCode},
body::Bytes,
extract::{Multipart, Path, Request},
http::StatusCode,
response::{Html, Redirect},
routing::{get, post},
BoxError, Router,
@@ -52,7 +52,7 @@ async fn main() {
// POST'ing to `/file/foo.txt` will create a file called `foo.txt`.
async fn save_request_body(
Path(file_name): Path<String>,
request: Request<Body>,
request: Request,
) -> Result<(), (StatusCode, String)> {
stream_to_file(&file_name, request.into_body()).await
}