mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-31 00:00:10 +02:00
Remove unneeded bounds on S in FromRequest(Parts) implementations
This doesn't actually allow using non-Send or non-Sync state types, but it makes the docs simpler.
This commit is contained in:
@@ -70,7 +70,7 @@ where
|
||||
type Rejection = ServerError;
|
||||
|
||||
async fn from_request(req: Request<B>, state: &S) -> Result<Self, Self::Rejection> {
|
||||
let Form(value) = Form::<T>::from_request(req, state).await?;
|
||||
let Form(value): Form<T> = req.extract().await?;
|
||||
value.validate()?;
|
||||
Ok(ValidatedForm(value))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user