Skip to content

Commit c29a73a

Browse files
author
Max Bruckner
authored
Document poll!(stream.next()) pattern for poll!(..) (#2357)
1 parent df6353e commit c29a73a

File tree

1 file changed

+4
-0
lines changed
  • futures-util/src/async_await

1 file changed

+4
-0
lines changed

futures-util/src/async_await/poll.rs

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ use futures_core::task::{Context, Poll};
99
/// This macro is only usable inside of `async` functions, closures, and blocks.
1010
/// It is also gated behind the `async-await` feature of this library, which is
1111
/// activated by default.
12+
///
13+
/// If you need the result of polling a [`Stream`](crate::stream::Stream),
14+
/// you can use this macro with the [`next`](crate::stream::StreamExt::next) method:
15+
/// `poll!(stream.next())`.
1216
#[macro_export]
1317
macro_rules! poll {
1418
($x:expr $(,)?) => {

0 commit comments

Comments
 (0)