1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-06-11 01:39:33 +00:00

remove crate level clippy lint

This commit is contained in:
Rob Ede 2021-12-22 07:16:07 +00:00
parent 17f636a183
commit 64c2e5e1cd
No known key found for this signature in database
GPG key ID: 97C636207D3EF933
6 changed files with 12 additions and 9 deletions

View file

@ -36,6 +36,7 @@ where
<S::Service as Service<Request>>::Future: 'static,
{
/// Create instance of `ServiceConfigBuilder`
#[allow(clippy::new_without_default)]
pub fn new() -> Self {
HttpServiceBuilder {
keep_alive: KeepAlive::Timeout(5),

View file

@ -19,7 +19,6 @@
#![allow(
clippy::type_complexity,
clippy::too_many_arguments,
clippy::new_without_default,
clippy::borrow_interior_mutable_const
)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
@ -28,6 +27,9 @@
#[macro_use]
extern crate log;
pub use ::http::{uri, uri::Uri};
pub use ::http::{Method, StatusCode, Version};
pub mod body;
mod builder;
mod config;
@ -61,9 +63,6 @@ pub use self::requests::{Request, RequestHead, RequestHeadType};
pub use self::responses::{Response, ResponseBuilder, ResponseHead};
pub use self::service::HttpService;
pub use ::http::{uri, uri::Uri};
pub use ::http::{Method, StatusCode, Version};
/// A major HTTP protocol version.
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
#[non_exhaustive]

View file

@ -43,6 +43,7 @@ pub struct Message<T: Head> {
impl<T: Head> Message<T> {
/// Get new message from the pool of objects
#[allow(clippy::new_without_default)]
pub fn new() -> Self {
T::with_pool(MessagePool::get_message)
}

View file

@ -1,5 +1,7 @@
use std::pin::Pin;
use std::task::{Context, Poll};
use std::{
pin::Pin,
task::{Context, Poll},
};
use bytes::Bytes;
use futures_core::Stream;

View file

@ -59,6 +59,7 @@ impl From<Message<RequestHead>> for Request<PayloadStream> {
impl Request<PayloadStream> {
/// Create new Request instance
#[allow(clippy::new_without_default)]
pub fn new() -> Request<PayloadStream> {
Request {
head: Message::new(),

View file

@ -10,10 +10,9 @@ use bytestring::ByteString;
use crate::{
body::{BoxBody, MessageBody},
extensions::Extensions,
header::{self, HeaderMap, TryIntoHeaderValue},
responses::{BoxedResponseHead, ResponseBuilder, ResponseHead},
Error, StatusCode,
responses::BoxedResponseHead,
Error, Extensions, ResponseBuilder, ResponseHead, StatusCode,
};
/// An HTTP response.