mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-29 09:41:34 +00:00
Automatic fixes by cargo-fix (#1662)
This commit is contained in:
@ -136,7 +136,7 @@ pub enum PingFailure {
|
||||
}
|
||||
|
||||
impl fmt::Display for PingFailure {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
PingFailure::Timeout => f.write_str("Ping timeout"),
|
||||
PingFailure::Other { error } => write!(f, "Ping error: {}", error)
|
||||
@ -221,7 +221,7 @@ impl ProtocolsHandler for PingHandler {
|
||||
}
|
||||
}
|
||||
|
||||
fn poll(&mut self, cx: &mut Context) -> Poll<ProtocolsHandlerEvent<protocol::Ping, (), PingResult, Self::Error>> {
|
||||
fn poll(&mut self, cx: &mut Context<'_>) -> Poll<ProtocolsHandlerEvent<protocol::Ping, (), PingResult, Self::Error>> {
|
||||
if let Some(result) = self.pending_results.pop_back() {
|
||||
if let Ok(PingSuccess::Ping { .. }) = result {
|
||||
self.failures = 0;
|
||||
|
@ -108,7 +108,7 @@ impl NetworkBehaviour for Ping {
|
||||
self.events.push_front(PingEvent { peer, result })
|
||||
}
|
||||
|
||||
fn poll(&mut self, _: &mut Context, _: &mut impl PollParameters)
|
||||
fn poll(&mut self, _: &mut Context<'_>, _: &mut impl PollParameters)
|
||||
-> Poll<NetworkBehaviourAction<Void, PingEvent>>
|
||||
{
|
||||
if let Some(e) = self.events.pop_back() {
|
||||
|
Reference in New Issue
Block a user