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