Clippy fixes (#503)

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

View file

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

View file

@ -63,5 +63,5 @@ fn from_hex(v: u8) -> Option<u8> {
#[inline] #[inline]
fn restore_ch(d1: u8, d2: u8) -> Option<u8> { 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::either::Either;
pub use self::join::{join, join_all}; pub use self::join::{join, join_all};
pub use self::lazy::{lazy, Lazy}; 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::ready::Ready;
pub use self::select::select; pub use self::select::select;

View file

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

View file

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

View file

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

View file

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

View file

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