mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-12 10:57:13 +00:00
Remove redundant loop (#1176)
This commit is contained in:
parent
b6378ac526
commit
f6ce1e6b3a
@ -209,7 +209,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn poll(&mut self) -> Poll<ProtocolsHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::OutEvent>, Self::Error> {
|
fn poll(&mut self) -> Poll<ProtocolsHandlerEvent<Self::OutboundProtocol, Self::OutboundOpenInfo, Self::OutEvent>, Self::Error> {
|
||||||
loop {
|
|
||||||
match self.proto1.poll().map_err(EitherError::A)? {
|
match self.proto1.poll().map_err(EitherError::A)? {
|
||||||
Async::Ready(ProtocolsHandlerEvent::Custom(event)) => {
|
Async::Ready(ProtocolsHandlerEvent::Custom(event)) => {
|
||||||
return Ok(Async::Ready(ProtocolsHandlerEvent::Custom(EitherOutput::First(event))));
|
return Ok(Async::Ready(ProtocolsHandlerEvent::Custom(EitherOutput::First(event))));
|
||||||
@ -242,9 +242,6 @@ where
|
|||||||
Async::NotReady => ()
|
Async::NotReady => ()
|
||||||
};
|
};
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(Async::NotReady)
|
Ok(Async::NotReady)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user