Skip to content

Commit f329281

Browse files
committed
f Drain results
1 parent f04b005 commit f329281

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lightning/src/util/async_poll.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl<F: Future<Output = Result<(), E>> + Unpin, E: Copy + Unpin> Future
5858
Poll::Pending
5959
} else {
6060
let results = futures_state
61-
.iter()
61+
.drain(..)
6262
.filter_map(|e| match e {
6363
ResultFuture::Ready(res) => Some(res),
6464
ResultFuture::Pending(_) => {
@@ -69,7 +69,6 @@ impl<F: Future<Output = Result<(), E>> + Unpin, E: Copy + Unpin> Future
6969
None
7070
},
7171
})
72-
.copied()
7372
.collect();
7473
Poll::Ready(results)
7574
}

0 commit comments

Comments
 (0)