mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-23 14:51:34 +00:00
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:
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user