Remove some #[allow(warnings)] (#376)

These were probably added during development and then forgotten to be
removed.
This commit is contained in:
David Pedersen 2021-10-08 16:09:44 +02:00 committed by GitHub
parent 2bedcc285b
commit fe4c0ae386
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 9 deletions

View File

@ -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)?;

View File

@ -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()

View File

@ -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();

View File

@ -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 {

View File

@ -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();