Make clippy "happy". (#1950)

* Make clippy "happy".

Address all clippy complaints that are not purely stylistic (or even
have corner cases with false positives). Ignore all "style" and "pedantic" lints.

* Fix tests.

* Undo unnecessary API change.
This commit is contained in:
Roman Borschel
2021-02-15 11:59:51 +01:00
committed by GitHub
parent 12557a3c86
commit 6499e924a3
43 changed files with 239 additions and 263 deletions

View File

@ -110,7 +110,7 @@ where
fn listen_protocol(&self) -> SubstreamProtocol<Self::InboundProtocol, Self::InboundOpenInfo> {
let proto1 = self.proto1.listen_protocol();
let proto2 = self.proto2.listen_protocol();
let timeout = std::cmp::max(proto1.timeout(), proto2.timeout()).clone();
let timeout = *std::cmp::max(proto1.timeout(), proto2.timeout());
let (_, u1, i1) = proto1.into_upgrade();
let (_, u2, i2) = proto2.into_upgrade();
let choice = SelectUpgrade::new(SendWrapper(u1), SendWrapper(u2));