mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 18:07:58 +00:00
Clippyfy (#6341)
* Add clippy config and remove .cargo from gitignore * first fixes * Clippyfied * Add clippy CI job * comment out rusty-cachier * minor * fix ci * remove DAG from check-dependent-project * add DAG to clippy Co-authored-by: alvicsam <alvicsam@gmail.com>
This commit is contained in:
@@ -174,7 +174,7 @@ impl Network for Arc<NetworkService<Block, Hash>> {
|
||||
Ok(v) => v,
|
||||
Err(_) => continue,
|
||||
};
|
||||
NetworkService::add_known_address(&*self, peer_id.clone(), addr);
|
||||
NetworkService::add_known_address(self, peer_id, addr);
|
||||
found_peer_id = Some(peer_id);
|
||||
}
|
||||
found_peer_id
|
||||
@@ -197,7 +197,7 @@ impl Network for Arc<NetworkService<Block, Hash>> {
|
||||
};
|
||||
|
||||
NetworkService::start_request(
|
||||
&*self,
|
||||
self,
|
||||
peer_id,
|
||||
req_protocol_names.get_name(protocol),
|
||||
payload,
|
||||
|
||||
@@ -213,7 +213,7 @@ where
|
||||
PeerSet::Collation => &mut shared.collation_peers,
|
||||
};
|
||||
|
||||
match peer_map.entry(peer.clone()) {
|
||||
match peer_map.entry(peer) {
|
||||
hash_map::Entry::Occupied(_) => continue,
|
||||
hash_map::Entry::Vacant(vacant) => {
|
||||
vacant.insert(PeerData { view: View::default(), version });
|
||||
@@ -234,12 +234,12 @@ where
|
||||
dispatch_validation_events_to_all(
|
||||
vec![
|
||||
NetworkBridgeEvent::PeerConnected(
|
||||
peer.clone(),
|
||||
peer,
|
||||
role,
|
||||
version,
|
||||
maybe_authority,
|
||||
),
|
||||
NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()),
|
||||
NetworkBridgeEvent::PeerViewChange(peer, View::default()),
|
||||
],
|
||||
&mut sender,
|
||||
)
|
||||
@@ -259,12 +259,12 @@ where
|
||||
dispatch_collation_events_to_all(
|
||||
vec![
|
||||
NetworkBridgeEvent::PeerConnected(
|
||||
peer.clone(),
|
||||
peer,
|
||||
role,
|
||||
version,
|
||||
maybe_authority,
|
||||
),
|
||||
NetworkBridgeEvent::PeerViewChange(peer.clone(), View::default()),
|
||||
NetworkBridgeEvent::PeerViewChange(peer, View::default()),
|
||||
],
|
||||
&mut sender,
|
||||
)
|
||||
@@ -421,7 +421,7 @@ where
|
||||
Some(ValidationVersion::V1.into())
|
||||
{
|
||||
handle_v1_peer_messages::<protocol_v1::ValidationProtocol, _>(
|
||||
remote.clone(),
|
||||
remote,
|
||||
PeerSet::Validation,
|
||||
&mut shared.0.lock().validation_peers,
|
||||
v_messages,
|
||||
@@ -442,7 +442,7 @@ where
|
||||
};
|
||||
|
||||
for report in reports {
|
||||
network_service.report_peer(remote.clone(), report);
|
||||
network_service.report_peer(remote, report);
|
||||
}
|
||||
|
||||
dispatch_validation_events_to_all(events, &mut sender).await;
|
||||
@@ -454,7 +454,7 @@ where
|
||||
Some(CollationVersion::V1.into())
|
||||
{
|
||||
handle_v1_peer_messages::<protocol_v1::CollationProtocol, _>(
|
||||
remote.clone(),
|
||||
remote,
|
||||
PeerSet::Collation,
|
||||
&mut shared.0.lock().collation_peers,
|
||||
c_messages,
|
||||
@@ -475,7 +475,7 @@ where
|
||||
};
|
||||
|
||||
for report in reports {
|
||||
network_service.report_peer(remote.clone(), report);
|
||||
network_service.report_peer(remote, report);
|
||||
}
|
||||
|
||||
dispatch_collation_events_to_all(events, &mut sender).await;
|
||||
@@ -795,11 +795,11 @@ fn handle_v1_peer_messages<RawMessage: Decode, OutMessage: From<RawMessage>>(
|
||||
} else {
|
||||
peer_data.view = new_view;
|
||||
|
||||
NetworkBridgeEvent::PeerViewChange(peer.clone(), peer_data.view.clone())
|
||||
NetworkBridgeEvent::PeerViewChange(peer, peer_data.view.clone())
|
||||
}
|
||||
},
|
||||
WireMessage::ProtocolMessage(message) =>
|
||||
NetworkBridgeEvent::PeerMessage(peer.clone(), message.into()),
|
||||
NetworkBridgeEvent::PeerMessage(peer, message.into()),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user