Remove redundant loop (#1176)

This commit is contained in:
Age Manning 2019-06-18 18:42:40 +10:00 committed by Pierre Krieger
parent b6378ac526
commit f6ce1e6b3a

View File

@ -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)
} }
} }