feat(swarm): rename Custom variant to NotifyBehaviour

Rename `ConnectionHandlerEvent::Custom` to `ConnectionHandlerEvent::NotifyBehaviour`.

Related #3848.

Pull-Request: #3955.
This commit is contained in:
Thomas Coratger
2023-05-16 21:20:00 +02:00
committed by GitHub
parent fbd471cd79
commit 9f3c85164c
18 changed files with 221 additions and 175 deletions

View File

@ -468,32 +468,28 @@ where
match poll_substreams(&mut self.inbound_substreams, cx) {
Poll::Ready(Ok((id, message))) => {
return Poll::Ready(ConnectionHandlerEvent::Custom(OutEvent::InboundEvent {
id,
message,
}))
return Poll::Ready(ConnectionHandlerEvent::NotifyBehaviour(
OutEvent::InboundEvent { id, message },
))
}
Poll::Ready(Err((id, error))) => {
return Poll::Ready(ConnectionHandlerEvent::Custom(OutEvent::InboundError {
id,
error,
}))
return Poll::Ready(ConnectionHandlerEvent::NotifyBehaviour(
OutEvent::InboundError { id, error },
))
}
Poll::Pending => {}
}
match poll_substreams(&mut self.outbound_substreams, cx) {
Poll::Ready(Ok((id, message))) => {
return Poll::Ready(ConnectionHandlerEvent::Custom(OutEvent::OutboundEvent {
id,
message,
}))
return Poll::Ready(ConnectionHandlerEvent::NotifyBehaviour(
OutEvent::OutboundEvent { id, message },
))
}
Poll::Ready(Err((id, error))) => {
return Poll::Ready(ConnectionHandlerEvent::Custom(OutEvent::OutboundError {
id,
error,
}))
return Poll::Ready(ConnectionHandlerEvent::NotifyBehaviour(
OutEvent::OutboundError { id, error },
))
}
Poll::Pending => {}
}