Skip to content

Commit c6345f5

Browse files
taiki-ecramertj
authored andcommitted
Remove ready!(Poll::Ready(..))
1 parent bcb61a7 commit c6345f5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

futures-util/src/sink/with_flat_map.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,10 @@ where
8383
if buffer.is_some() {
8484
ready!(sink.as_mut().poll_ready(cx))?;
8585
let item = buffer.take().unwrap();
86-
ready!(Poll::Ready(sink.as_mut().start_send(item)))?;
86+
sink.as_mut().start_send(item)?;
8787
}
8888
if let Some(mut some_stream) = stream.as_mut().as_pin_mut() {
89-
while let Some(x) = ready!(some_stream.as_mut().poll_next(cx)) {
90-
let item = ready!(Poll::Ready(x))?;
89+
while let Some(item) = ready!(some_stream.as_mut().poll_next(cx)?) {
9190
match sink.as_mut().poll_ready(cx)? {
9291
Poll::Ready(()) => sink.as_mut().start_send(item)?,
9392
Poll::Pending => {

0 commit comments

Comments
 (0)