swarm/behaviour: Remove deprecated NetworkBehaviourEventProcess (#2840)

Removes the `NetworkBehaviourEventProcess` and all its associated logic.

See deprecation pull request https://github.com/libp2p/rust-libp2p/pull/2784.

Find rational in https://github.com/libp2p/rust-libp2p/pull/2751.
This commit is contained in:
Max Inden
2022-08-26 07:08:33 +02:00
committed by GitHub
parent d92cab8581
commit ca07ce4d64
36 changed files with 145 additions and 183 deletions

View File

@ -19,8 +19,6 @@
// DEALINGS IN THE SOFTWARE.
use crate::handler::{either::IntoEitherHandler, ConnectionHandler, IntoConnectionHandler};
#[allow(deprecated)]
pub use crate::NetworkBehaviourEventProcess;
use crate::{DialError, NetworkBehaviour, NetworkBehaviourAction, PollParameters};
use either::Either;
use libp2p_core::{
@ -235,18 +233,3 @@ where
Poll::Ready(event)
}
}
#[allow(deprecated)]
impl<TEvent, TBehaviourLeft, TBehaviourRight> NetworkBehaviourEventProcess<TEvent>
for Either<TBehaviourLeft, TBehaviourRight>
where
TBehaviourLeft: NetworkBehaviourEventProcess<TEvent>,
TBehaviourRight: NetworkBehaviourEventProcess<TEvent>,
{
fn inject_event(&mut self, event: TEvent) {
match self {
Either::Left(a) => a.inject_event(event),
Either::Right(b) => b.inject_event(event),
}
}
}