mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-27 00:00:24 +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
@@ -12,9 +12,8 @@
|
||||
|
||||
use async_trait::async_trait;
|
||||
use axum::{
|
||||
body::Body,
|
||||
extract::{rejection::FormRejection, Form, FromRequest},
|
||||
http::{Request, StatusCode},
|
||||
extract::{rejection::FormRejection, Form, FromRequest, Request},
|
||||
http::StatusCode,
|
||||
response::{Html, IntoResponse, Response},
|
||||
routing::get,
|
||||
Router,
|
||||
@@ -70,7 +69,7 @@ where
|
||||
{
|
||||
type Rejection = ServerError;
|
||||
|
||||
async fn from_request(req: Request<Body>, state: &S) -> Result<Self, Self::Rejection> {
|
||||
async fn from_request(req: Request, state: &S) -> Result<Self, Self::Rejection> {
|
||||
let Form(value) = Form::<T>::from_request(req, state).await?;
|
||||
value.validate()?;
|
||||
Ok(ValidatedForm(value))
|
||||
|
||||
Reference in New Issue
Block a user