swarm/src/behaviour: Deprecate NetworkBehaviourEventProcess (#2784)

In preparation for https://github.com/libp2p/rust-libp2p/pull/2751.
This commit is contained in:
Max Inden
2022-08-16 06:58:17 +02:00
committed by GitHub
parent 0e5a25dea8
commit 878c49fa14
9 changed files with 267 additions and 164 deletions

View File

@ -19,10 +19,9 @@
// DEALINGS IN THE SOFTWARE.
use crate::handler::{either::IntoEitherHandler, ConnectionHandler, IntoConnectionHandler};
use crate::{
DialError, NetworkBehaviour, NetworkBehaviourAction, NetworkBehaviourEventProcess,
PollParameters,
};
#[allow(deprecated)]
pub use crate::NetworkBehaviourEventProcess;
use crate::{DialError, NetworkBehaviour, NetworkBehaviourAction, PollParameters};
use either::Either;
use libp2p_core::{
connection::ConnectionId, transport::ListenerId, ConnectedPoint, Multiaddr, PeerId,
@ -237,6 +236,7 @@ where
}
}
#[allow(deprecated)]
impl<TEvent, TBehaviourLeft, TBehaviourRight> NetworkBehaviourEventProcess<TEvent>
for Either<TBehaviourLeft, TBehaviourRight>
where