Skip to content

Commit a3ceeac

Browse files
committed
Hide the type of &Waker in stream::next
1 parent d1b29ac commit a3ceeac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/stream.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ pub async fn next<St>(stream: &mut St) -> Option<St::Item>
66
where St: Stream + Unpin,
77
{
88
use futures::future::poll_fn;
9-
use futures::task::Waker;
10-
let poll_next = |waker: &Waker| Pin::new(&mut *stream).poll_next(waker);
9+
let poll_next = |waker: &_| Pin::new(&mut *stream).poll_next(waker);
1110
let future_next = poll_fn(poll_next);
1211
await!(future_next)
1312
}

0 commit comments

Comments
 (0)