Skip to content

Commit

Permalink
Document poll!(stream.next()) pattern for poll!(..) (#2357)
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Bruckner authored Feb 22, 2021
1 parent df6353e commit c29a73a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions futures-util/src/async_await/poll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ use futures_core::task::{Context, Poll};
/// This macro is only usable inside of `async` functions, closures, and blocks.
/// It is also gated behind the `async-await` feature of this library, which is
/// activated by default.
///
/// If you need the result of polling a [`Stream`](crate::stream::Stream),
/// you can use this macro with the [`next`](crate::stream::StreamExt::next) method:
/// `poll!(stream.next())`.
#[macro_export]
macro_rules! poll {
($x:expr $(,)?) => {
Expand Down

0 comments on commit c29a73a

Please sign in to comment.