Fix Transport::and_then (#690)

This commit is contained in:
Pierre Krieger
2018-11-27 19:13:34 +01:00
committed by GitHub
parent e12795d1e6
commit 6cde480c29

View File

@ -149,6 +149,7 @@ where
type Error = T::Error;
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
loop {
let future = match self.inner {
Either::A(ref mut future) => {
let item = try_ready!(future.poll());
@ -157,8 +158,9 @@ where
}
Either::B(ref mut future) => return future.poll()
};
self.inner = Either::B(future);
Ok(Async::NotReady)
}
}
}