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
+5 -5
View File
@@ -5,9 +5,9 @@
//! ```
use axum::{
body::Bytes,
extract::{BodyStream, Multipart, Path},
http::StatusCode,
body::{Body, Bytes},
extract::{Multipart, Path},
http::{Request, StatusCode},
response::{Html, Redirect},
routing::{get, post},
BoxError, Router,
@@ -52,9 +52,9 @@ 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>,
body: BodyStream,
request: Request<Body>,
) -> Result<(), (StatusCode, String)> {
stream_to_file(&file_name, body).await
stream_to_file(&file_name, request.into_body()).await
}
// Handler that returns HTML for a multipart form.