mirror of
https://github.com/tokio-rs/axum.git
synced 2025-09-28 05:20:46 +00:00
Remove some #[allow(warnings)]
(#376)
These were probably added during development and then forgotten to be removed.
This commit is contained in:
parent
2bedcc285b
commit
fe4c0ae386
@ -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()
|
||||
|
@ -120,7 +120,6 @@ where
|
||||
{
|
||||
type Output = Result<Response<BoxBody>, S::Error>;
|
||||
|
||||
#[allow(warnings)]
|
||||
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||
loop {
|
||||
let mut this = self.as_mut().project();
|
||||
|
@ -31,7 +31,6 @@ fn traits() {
|
||||
assert_sync::<Or<(), ()>>();
|
||||
}
|
||||
|
||||
#[allow(warnings)]
|
||||
impl<A, B, ReqBody> Service<Request<ReqBody>> for Or<A, B>
|
||||
where
|
||||
A: Service<Request<ReqBody>, Response = Response<BoxBody>> + Clone,
|
||||
@ -46,11 +45,11 @@ where
|
||||
type Error = A::Error;
|
||||
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(()))
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
ResponseFuture {
|
||||
|
@ -81,7 +81,6 @@ where
|
||||
{
|
||||
type Output = Result<Response<BoxBody>, S::Error>;
|
||||
|
||||
#[allow(warnings)]
|
||||
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
||||
let this = self.project();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user