1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-26 06:57:43 +02:00

chore: move deny lints to manifests

This commit is contained in:
Rob Ede
2024-07-07 03:54:00 +01:00
parent b01fbddba4
commit e0e4d1e661
42 changed files with 95 additions and 71 deletions

View File

@ -153,6 +153,9 @@ tokio = { version = "1.24.2", features = ["rt-multi-thread", "macros"] }
zstd = "0.13"
tls-rustls-0_23 = { package = "rustls", version = "0.23" } # add rustls 0.23 with default features to make aws_lc_rs work in tests
[lints]
workspace = true
[[example]]
name = "client"
required-features = ["rustls-0_23-webpki-roots"]

View File

@ -173,12 +173,15 @@ where
};
// acquire an owned permit and carry it with connection
let permit = inner.permits.clone().acquire_owned().await.map_err(|_| {
ConnectError::Io(io::Error::new(
io::ErrorKind::Other,
"failed to acquire semaphore on client connection pool",
))
})?;
let permit = Arc::clone(&inner.permits)
.acquire_owned()
.await
.map_err(|_| {
ConnectError::Io(io::Error::new(
io::ErrorKind::Other,
"failed to acquire semaphore on client connection pool",
))
})?;
let conn = {
let mut conn = None;

View File

@ -49,7 +49,7 @@ impl FrozenClientRequest {
where
B: MessageBody + 'static,
{
RequestSender::Rc(self.head.clone(), None).send_body(
RequestSender::Rc(Rc::clone(&self.head), None).send_body(
self.addr,
self.response_decompress,
self.timeout,
@ -60,7 +60,7 @@ impl FrozenClientRequest {
/// Send a json body.
pub fn send_json<T: Serialize>(&self, value: &T) -> SendClientRequest {
RequestSender::Rc(self.head.clone(), None).send_json(
RequestSender::Rc(Rc::clone(&self.head), None).send_json(
self.addr,
self.response_decompress,
self.timeout,
@ -71,7 +71,7 @@ impl FrozenClientRequest {
/// Send an urlencoded body.
pub fn send_form<T: Serialize>(&self, value: &T) -> SendClientRequest {
RequestSender::Rc(self.head.clone(), None).send_form(
RequestSender::Rc(Rc::clone(&self.head), None).send_form(
self.addr,
self.response_decompress,
self.timeout,
@ -86,7 +86,7 @@ impl FrozenClientRequest {
S: Stream<Item = Result<Bytes, E>> + 'static,
E: Into<BoxError> + 'static,
{
RequestSender::Rc(self.head.clone(), None).send_stream(
RequestSender::Rc(Rc::clone(&self.head), None).send_stream(
self.addr,
self.response_decompress,
self.timeout,
@ -97,7 +97,7 @@ impl FrozenClientRequest {
/// Send an empty body.
pub fn send(&self) -> SendClientRequest {
RequestSender::Rc(self.head.clone(), None).send(
RequestSender::Rc(Rc::clone(&self.head), None).send(
self.addr,
self.response_decompress,
self.timeout,

View File

@ -100,8 +100,6 @@
//! # }
//! ```
#![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible)]
#![allow(unknown_lints)] // temp: #[allow(non_local_definitions)]
#![allow(
clippy::type_complexity,

View File

@ -78,7 +78,7 @@ where
RedirectServiceFuture::Tunnel { fut }
}
ConnectRequest::Client(head, body, addr) => {
let connector = self.connector.clone();
let connector = Rc::clone(&self.connector);
let max_redirect_times = self.max_redirect_times;
// backup the uri and method for reuse schema and authority.