protocols/ping: Properly deprecate types with Ping prefix (#2937)

Co-authored-by: Elena Frank <elena.frank@protonmail.com>
Co-authored-by:  João Oliveira <hello@jxs.pt>
This commit is contained in:
Thomas Eizinger
2022-10-01 00:19:34 +10:00
committed by GitHub
parent cce296e55e
commit 1da75b2b25
17 changed files with 162 additions and 159 deletions

View File

@ -42,8 +42,7 @@ use libp2p::{
identify::{Identify, IdentifyConfig, IdentifyEvent},
identity,
multiaddr::Protocol,
noise,
ping::{self, PingEvent},
noise, ping,
pnet::{PnetConfig, PreSharedKey},
swarm::SwarmEvent,
tcp::TcpTransport,
@ -165,7 +164,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
enum MyBehaviourEvent {
Gossipsub(GossipsubEvent),
Identify(IdentifyEvent),
Ping(PingEvent),
Ping(ping::Event),
}
impl From<GossipsubEvent> for MyBehaviourEvent {
@ -180,8 +179,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
}
}
impl From<PingEvent> for MyBehaviourEvent {
fn from(event: PingEvent) -> Self {
impl From<ping::Event> for MyBehaviourEvent {
fn from(event: ping::Event) -> Self {
MyBehaviourEvent::Ping(event)
}
}