1
0
Fork 0
mirror of https://github.com/ntex-rs/ntex.git synced 2025-04-01 03:47:38 +03:00

Clippy fixes ()

This commit is contained in:
Nikolay Kim 2025-01-15 18:27:00 +05:00 committed by GitHub
parent 4d4ab811bd
commit 5b11a3e30e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 12 additions and 17 deletions
ntex-router/src
ntex-util/src/future
ntex/src

View file

@ -1,9 +1,4 @@
#![deny(
rust_2018_idioms,
warnings,
unreachable_pub,
missing_debug_implementations
)]
#![deny(warnings, unreachable_pub, missing_debug_implementations)]
#![warn(nonstandard_style, future_incompatible)]
//! Resource path matching library.

View file

@ -63,5 +63,5 @@ fn from_hex(v: u8) -> Option<u8> {
#[inline]
fn restore_ch(d1: u8, d2: u8) -> Option<u8> {
from_hex(d1).and_then(|d1| from_hex(d2).map(move |d2| d1 << 4 | d2))
from_hex(d1).and_then(|d1| from_hex(d2).map(move |d2| (d1 << 4) | d2))
}

View file

@ -14,7 +14,7 @@ mod select;
pub use self::either::Either;
pub use self::join::{join, join_all};
pub use self::lazy::{lazy, Lazy};
pub use self::on_drop::{OnDropFn, OnDropFutureExt};
pub use self::on_drop::{OnDropFn, OnDropFuture, OnDropFutureExt};
pub use self::ready::Ready;
pub use self::select::select;

View file

@ -290,7 +290,7 @@ where
let mut inflight = self.inflight.borrow_mut();
inflight.remove(&ioref);
if inflight.len() == 0 {
if inflight.is_empty() {
if let Some(tx) = self.tx.take() {
let _ = tx.send(());
}

View file

@ -286,7 +286,7 @@ where
let mut inflight = self.inflight.borrow_mut();
inflight.remove(&ioref);
if inflight.len() == 0 {
if inflight.is_empty() {
if let Some(tx) = self.tx.take() {
let _ = tx.send(());
}

View file

@ -387,7 +387,7 @@ where
let mut inflight = self.inflight.borrow_mut();
inflight.remove(&ioref);
if inflight.len() == 0 {
if inflight.is_empty() {
if let Some(tx) = self.tx.take() {
let _ = tx.send(());
}

View file

@ -257,7 +257,7 @@ where
server,
client: Client::build().finish(),
}
.set_client_timeout(Seconds(60), Millis(60_000))
.set_client_timeout(Seconds(90), Millis(90_000))
}
#[derive(Debug)]

View file

@ -718,7 +718,7 @@ where
Connector::default()
.lifetime(Seconds::ZERO)
.keep_alive(Seconds(60))
.timeout(Millis(60_000))
.timeout(Millis(90_000))
.disconnect_timeout(Seconds(5))
.openssl(builder.build())
.finish()
@ -727,14 +727,14 @@ where
{
Connector::default()
.lifetime(Seconds::ZERO)
.timeout(Millis(60_000))
.timeout(Millis(90_000))
.finish()
}
};
Client::build()
.connector(connector)
.timeout(Seconds(60))
.timeout(Seconds(90))
.finish()
};
@ -929,7 +929,7 @@ impl TestServer {
WsClient::build(self.url(path))
.address(self.addr)
.timeout(Seconds(30))
.timeout(Seconds(60))
.openssl(builder.build())
.take()
.finish()
@ -945,7 +945,7 @@ impl TestServer {
} else {
WsClient::build(self.url(path))
.address(self.addr)
.timeout(Seconds(30))
.timeout(Seconds(60))
.finish()
.unwrap()
.connect()