Skip to content

Commit 5b11a3e

Browse files
authored
Clippy fixes (#503)
1 parent 4d4ab81 commit 5b11a3e

File tree

8 files changed

+12
-17
lines changed

8 files changed

+12
-17
lines changed

ntex-router/src/lib.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
#![deny(
2-
rust_2018_idioms,
3-
warnings,
4-
unreachable_pub,
5-
missing_debug_implementations
6-
)]
1+
#![deny(warnings, unreachable_pub, missing_debug_implementations)]
72
#![warn(nonstandard_style, future_incompatible)]
83

94
//! Resource path matching library.

ntex-router/src/quoter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ fn from_hex(v: u8) -> Option<u8> {
6363

6464
#[inline]
6565
fn restore_ch(d1: u8, d2: u8) -> Option<u8> {
66-
from_hex(d1).and_then(|d1| from_hex(d2).map(move |d2| d1 << 4 | d2))
66+
from_hex(d1).and_then(|d1| from_hex(d2).map(move |d2| (d1 << 4) | d2))
6767
}

ntex-util/src/future/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ mod select;
1414
pub use self::either::Either;
1515
pub use self::join::{join, join_all};
1616
pub use self::lazy::{lazy, Lazy};
17-
pub use self::on_drop::{OnDropFn, OnDropFutureExt};
17+
pub use self::on_drop::{OnDropFn, OnDropFuture, OnDropFutureExt};
1818
pub use self::ready::Ready;
1919
pub use self::select::select;
2020

ntex/src/http/h1/service.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ where
290290
let mut inflight = self.inflight.borrow_mut();
291291
inflight.remove(&ioref);
292292

293-
if inflight.len() == 0 {
293+
if inflight.is_empty() {
294294
if let Some(tx) = self.tx.take() {
295295
let _ = tx.send(());
296296
}

ntex/src/http/h2/service.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ where
286286
let mut inflight = self.inflight.borrow_mut();
287287
inflight.remove(&ioref);
288288

289-
if inflight.len() == 0 {
289+
if inflight.is_empty() {
290290
if let Some(tx) = self.tx.take() {
291291
let _ = tx.send(());
292292
}

ntex/src/http/service.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ where
387387
let mut inflight = self.inflight.borrow_mut();
388388
inflight.remove(&ioref);
389389

390-
if inflight.len() == 0 {
390+
if inflight.is_empty() {
391391
if let Some(tx) = self.tx.take() {
392392
let _ = tx.send(());
393393
}

ntex/src/http/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ where
257257
server,
258258
client: Client::build().finish(),
259259
}
260-
.set_client_timeout(Seconds(60), Millis(60_000))
260+
.set_client_timeout(Seconds(90), Millis(90_000))
261261
}
262262

263263
#[derive(Debug)]

ntex/src/web/test.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ where
718718
Connector::default()
719719
.lifetime(Seconds::ZERO)
720720
.keep_alive(Seconds(60))
721-
.timeout(Millis(60_000))
721+
.timeout(Millis(90_000))
722722
.disconnect_timeout(Seconds(5))
723723
.openssl(builder.build())
724724
.finish()
@@ -727,14 +727,14 @@ where
727727
{
728728
Connector::default()
729729
.lifetime(Seconds::ZERO)
730-
.timeout(Millis(60_000))
730+
.timeout(Millis(90_000))
731731
.finish()
732732
}
733733
};
734734

735735
Client::build()
736736
.connector(connector)
737-
.timeout(Seconds(60))
737+
.timeout(Seconds(90))
738738
.finish()
739739
};
740740

@@ -929,7 +929,7 @@ impl TestServer {
929929

930930
WsClient::build(self.url(path))
931931
.address(self.addr)
932-
.timeout(Seconds(30))
932+
.timeout(Seconds(60))
933933
.openssl(builder.build())
934934
.take()
935935
.finish()
@@ -945,7 +945,7 @@ impl TestServer {
945945
} else {
946946
WsClient::build(self.url(path))
947947
.address(self.addr)
948-
.timeout(Seconds(30))
948+
.timeout(Seconds(60))
949949
.finish()
950950
.unwrap()
951951
.connect()

0 commit comments

Comments
 (0)