refactor(swarm): remove deprecated inject calls (#3264)

Finishes work first started with https://github.com/libp2p/rust-libp2p/issues/2832
This commit is contained in:
João Oliveira
2023-01-12 11:21:02 +00:00
committed by GitHub
parent 3cc824796d
commit 4c65c7d7c7
23 changed files with 1177 additions and 1376 deletions

View File

@ -97,7 +97,7 @@ impl SubstreamHandler for Stream {
Stream::PendingRead(Framed::new(substream, RendezvousCodec::default()))
}
fn inject_event(self, event: Self::InEvent) -> Self {
fn on_event(self, event: Self::InEvent) -> Self {
match (event, self) {
(InEvent::RegisterResponse { ttl }, Stream::PendingBehaviour(substream)) => {
Stream::PendingSend(substream, Message::RegisterResponse(Ok(ttl)))