mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 01:51:23 +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:
@ -296,7 +296,7 @@ where
|
||||
> {
|
||||
// Drain pending events.
|
||||
if let Some(event) = self.pending_events.pop_front() {
|
||||
return Poll::Ready(ConnectionHandlerEvent::Custom(event));
|
||||
return Poll::Ready(ConnectionHandlerEvent::NotifyBehaviour(event));
|
||||
} else if self.pending_events.capacity() > EMPTY_QUEUE_SHRINK_THRESHOLD {
|
||||
self.pending_events.shrink_to_fit();
|
||||
}
|
||||
@ -307,7 +307,7 @@ where
|
||||
Ok(((id, rq), rs_sender)) => {
|
||||
// We received an inbound request.
|
||||
self.keep_alive = KeepAlive::Yes;
|
||||
return Poll::Ready(ConnectionHandlerEvent::Custom(Event::Request {
|
||||
return Poll::Ready(ConnectionHandlerEvent::NotifyBehaviour(Event::Request {
|
||||
request_id: id,
|
||||
request: rq,
|
||||
sender: rs_sender,
|
||||
|
Reference in New Issue
Block a user