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

@ -91,18 +91,18 @@ pub(crate) type THandlerOutEvent<THandler> =
///
/// ``` rust
/// # use libp2p::identify::{Identify, IdentifyEvent};
/// # use libp2p::ping::{Ping, PingEvent};
/// # use libp2p::ping;
/// # use libp2p::NetworkBehaviour;
/// #[derive(NetworkBehaviour)]
/// #[behaviour(out_event = "Event")]
/// struct MyBehaviour {
/// identify: Identify,
/// ping: Ping,
/// ping: ping::Behaviour,
/// }
///
/// enum Event {
/// Identify(IdentifyEvent),
/// Ping(PingEvent),
/// Ping(ping::Event),
/// }
///
/// impl From<IdentifyEvent> for Event {
@ -111,8 +111,8 @@ pub(crate) type THandlerOutEvent<THandler> =
/// }
/// }
///
/// impl From<PingEvent> for Event {
/// fn from(event: PingEvent) -> Self {
/// impl From<ping::Event> for Event {
/// fn from(event: ping::Event) -> Self {
/// Self::Ping(event)
/// }
/// }