mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-23 00:00:15 +02:00
Remove some #[allow(warnings)] (#376)
These were probably added during development and then forgotten to be removed.
This commit is contained in:
+2
-3
@@ -53,7 +53,6 @@ where
|
||||
{
|
||||
type Rejection = FormRejection;
|
||||
|
||||
#[allow(warnings)]
|
||||
async fn from_request(req: &mut RequestParts<B>) -> Result<Self, Self::Rejection> {
|
||||
if req.method() == Method::GET {
|
||||
let query = req.uri().query().unwrap_or_default();
|
||||
@@ -61,8 +60,8 @@ where
|
||||
.map_err(FailedToDeserializeQueryString::new::<T, _>)?;
|
||||
Ok(Form(value))
|
||||
} else {
|
||||
if !has_content_type(&req, "application/x-www-form-urlencoded")? {
|
||||
Err(InvalidFormContentType)?;
|
||||
if !has_content_type(req, "application/x-www-form-urlencoded")? {
|
||||
return Err(InvalidFormContentType.into());
|
||||
}
|
||||
|
||||
let body = take_body(req)?;
|
||||
|
||||
@@ -150,7 +150,6 @@ where
|
||||
{
|
||||
type Rejection = PathParamsRejection;
|
||||
|
||||
#[allow(warnings)]
|
||||
async fn from_request(req: &mut RequestParts<B>) -> Result<Self, Self::Rejection> {
|
||||
let params = match req
|
||||
.extensions_mut()
|
||||
|
||||
Reference in New Issue
Block a user