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

@ -201,8 +201,8 @@ impl NetworkBehaviour for Mdns {
if let MdnsBusyWrapper::Free(ref mut service) = self.service {
for packet in build_query_response(
query.query_id(),
params.local_peer_id().clone(),
params.listened_addresses().into_iter(),
*params.local_peer_id(),
params.listened_addresses(),
MDNS_RESPONSE_TTL,
) {
service.enqueue_response(packet)
@ -240,10 +240,10 @@ impl NetworkBehaviour for Mdns {
{
*cur_expires = cmp::max(*cur_expires, new_expiration);
} else {
self.discovered_nodes.push((peer.id().clone(), addr.clone(), new_expiration));
self.discovered_nodes.push((*peer.id(), addr.clone(), new_expiration));
}
discovered.push((peer.id().clone(), addr));
discovered.push((*peer.id(), addr));
}
}