mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-02 19:21:37 +00:00
feat(swarm): rename Custom
variant to NotifyBehaviour
Rename `ConnectionHandlerEvent::Custom` to `ConnectionHandlerEvent::NotifyBehaviour`. Related #3848. Pull-Request: #3955.
This commit is contained in:
@ -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 => {}
|
||||
}
|
||||
|
Reference in New Issue
Block a user