Skip to content

Commit b68aaa0

Browse files
committed
Replace futures::future::poll_fn with our implementation in stream::next
1 parent 4d93e62 commit b68aaa0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/stream.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use futures::stream::Stream;
22
use futures::future::Future;
3+
34
use core::pin::Pin;
45
use core::iter::IntoIterator;
56

@@ -8,7 +9,7 @@ use pin_utils::pin_mut;
89
pub async fn next<St>(stream: &mut St) -> Option<St::Item>
910
where St: Stream + Unpin,
1011
{
11-
use futures::future::poll_fn;
12+
use crate::future::poll_fn;
1213
let poll_next = |waker: &_| Pin::new(&mut *stream).poll_next(waker);
1314
let future_next = poll_fn(poll_next);
1415
await!(future_next)

0 commit comments

Comments
 (0)