Skip to content

Commit

Permalink
Fix compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Apr 19, 2023
1 parent 3e33108 commit 572ed90
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions protocols/gossipsub/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,9 @@ impl ConnectionHandler for Handler {
log::debug!("Protocol negotiation failed: {e}")
}
ConnectionEvent::AddressChange(_)
| ConnectionEvent::ListenUpgradeError(_)
| ConnectionEvent::LocalProtocolsChange(_)
| ConnectionEvent::RemoteProtocolsChange(_) => {}
| ConnectionEvent::ListenUpgradeError(_)
| ConnectionEvent::LocalProtocolsChange(_)
| ConnectionEvent::RemoteProtocolsChange(_) => {}
}
}
Handler::Disabled(_) => {}
Expand Down
3 changes: 3 additions & 0 deletions swarm/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,9 @@ pub trait PollParameters {
/// The iterator's elements are the ASCII names as reported on the wire.
///
/// Note that the list is computed once at initialization and never refreshed.
#[deprecated(
note = "Use `libp2p_swarm::SupportedProtocols` in your `ConnectionHandler` instead."
)]
fn supported_protocols(&self) -> Self::SupportedProtocolsIter;

/// Returns the list of the addresses we're listening on.
Expand Down
4 changes: 4 additions & 0 deletions swarm/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ impl<'a, IP: InboundUpgradeSend, OP: OutboundUpgradeSend, IOI, OOI>
}
ConnectionEvent::FullyNegotiatedInbound(_)
| ConnectionEvent::AddressChange(_)
| ConnectionEvent::LocalProtocolsChange(_)
| ConnectionEvent::RemoteProtocolsChange(_)
| ConnectionEvent::ListenUpgradeError(_) => false,
}
}
Expand All @@ -247,6 +249,8 @@ impl<'a, IP: InboundUpgradeSend, OP: OutboundUpgradeSend, IOI, OOI>
ConnectionEvent::FullyNegotiatedOutbound(_)
| ConnectionEvent::ListenUpgradeError(_)
| ConnectionEvent::AddressChange(_)
| ConnectionEvent::LocalProtocolsChange(_)
| ConnectionEvent::RemoteProtocolsChange(_)
| ConnectionEvent::DialUpgradeError(_) => false,
}
}
Expand Down

0 comments on commit 572ed90

Please sign in to comment.