mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-29 00:00:18 +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;
|
type Rejection = FormRejection;
|
||||||
|
|
||||||
#[allow(warnings)]
|
|
||||||
async fn from_request(req: &mut RequestParts<B>) -> Result<Self, Self::Rejection> {
|
async fn from_request(req: &mut RequestParts<B>) -> Result<Self, Self::Rejection> {
|
||||||
if req.method() == Method::GET {
|
if req.method() == Method::GET {
|
||||||
let query = req.uri().query().unwrap_or_default();
|
let query = req.uri().query().unwrap_or_default();
|
||||||
@@ -61,8 +60,8 @@ where
|
|||||||
.map_err(FailedToDeserializeQueryString::new::<T, _>)?;
|
.map_err(FailedToDeserializeQueryString::new::<T, _>)?;
|
||||||
Ok(Form(value))
|
Ok(Form(value))
|
||||||
} else {
|
} else {
|
||||||
if !has_content_type(&req, "application/x-www-form-urlencoded")? {
|
if !has_content_type(req, "application/x-www-form-urlencoded")? {
|
||||||
Err(InvalidFormContentType)?;
|
return Err(InvalidFormContentType.into());
|
||||||
}
|
}
|
||||||
|
|
||||||
let body = take_body(req)?;
|
let body = take_body(req)?;
|
||||||
|
|||||||
@@ -150,7 +150,6 @@ where
|
|||||||
{
|
{
|
||||||
type Rejection = PathParamsRejection;
|
type Rejection = PathParamsRejection;
|
||||||
|
|
||||||
#[allow(warnings)]
|
|
||||||
async fn from_request(req: &mut RequestParts<B>) -> Result<Self, Self::Rejection> {
|
async fn from_request(req: &mut RequestParts<B>) -> Result<Self, Self::Rejection> {
|
||||||
let params = match req
|
let params = match req
|
||||||
.extensions_mut()
|
.extensions_mut()
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ where
|
|||||||
{
|
{
|
||||||
type Output = Result<Response<BoxBody>, S::Error>;
|
type Output = Result<Response<BoxBody>, S::Error>;
|
||||||
|
|
||||||
#[allow(warnings)]
|
|
||||||
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||||
loop {
|
loop {
|
||||||
let mut this = self.as_mut().project();
|
let mut this = self.as_mut().project();
|
||||||
|
|||||||
+2
-3
@@ -31,7 +31,6 @@ fn traits() {
|
|||||||
assert_sync::<Or<(), ()>>();
|
assert_sync::<Or<(), ()>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(warnings)]
|
|
||||||
impl<A, B, ReqBody> Service<Request<ReqBody>> for Or<A, B>
|
impl<A, B, ReqBody> Service<Request<ReqBody>> for Or<A, B>
|
||||||
where
|
where
|
||||||
A: Service<Request<ReqBody>, Response = Response<BoxBody>> + Clone,
|
A: Service<Request<ReqBody>, Response = Response<BoxBody>> + Clone,
|
||||||
@@ -46,11 +45,11 @@ where
|
|||||||
type Error = A::Error;
|
type Error = A::Error;
|
||||||
type Future = ResponseFuture<A, B, ReqBody>;
|
type Future = ResponseFuture<A, B, ReqBody>;
|
||||||
|
|
||||||
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
|
||||||
Poll::Ready(Ok(()))
|
Poll::Ready(Ok(()))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn call(&mut self, mut req: Request<ReqBody>) -> Self::Future {
|
fn call(&mut self, req: Request<ReqBody>) -> Self::Future {
|
||||||
let original_uri = req.uri().clone();
|
let original_uri = req.uri().clone();
|
||||||
|
|
||||||
ResponseFuture {
|
ResponseFuture {
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ where
|
|||||||
{
|
{
|
||||||
type Output = Result<Response<BoxBody>, S::Error>;
|
type Output = Result<Response<BoxBody>, S::Error>;
|
||||||
|
|
||||||
#[allow(warnings)]
|
|
||||||
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||||
let this = self.project();
|
let this = self.project();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user