*: Fix clippy warnings (#2227)

This commit is contained in:
Roman
2021-09-14 16:00:05 +03:00
committed by GitHub
parent 5f68c74177
commit b79fd02f0b
25 changed files with 93 additions and 124 deletions

View File

@ -333,7 +333,7 @@ where
pub fn dial_addr(&mut self, addr: Multiaddr) -> Result<(), DialError> {
let handler = self.behaviour.new_handler();
self.dial_addr_with_handler(addr, handler)
.map_err(|e| DialError::from_network_dial_error(e))
.map_err(DialError::from_network_dial_error)
.map_err(|(e, _)| e)
}
@ -392,7 +392,7 @@ where
Err(error) => {
let (error, handler) = DialError::from_network_dial_error(error);
self.behaviour.inject_dial_failure(
&peer_id,
peer_id,
handler.into_protocols_handler(),
error.clone(),
);
@ -1051,7 +1051,7 @@ impl<'a> PollParameters for SwarmPollParameters<'a> {
}
fn local_peer_id(&self) -> &PeerId {
&self.local_peer_id
self.local_peer_id
}
}