Skip to content

Commit

Permalink
Fix compatibility of futures-util with futures 0.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nemo157 committed Feb 4, 2020
1 parent b825f30 commit d88cc6f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions futures-util/src/async_await/select_mod.rs
Expand Up @@ -5,7 +5,7 @@ use proc_macro_hack::proc_macro_hack;
#[doc(hidden)]
#[macro_export]
macro_rules! document_select_macro {
($select:item $select_biased:item) => {
($select:item) => {
/// Polls multiple futures and streams simultaneously, executing the branch
/// for the future that finishes first. If multiple futures are ready,
/// one will be pseudo-randomly selected at runtime. Futures directly
Expand Down Expand Up @@ -155,6 +155,11 @@ macro_rules! document_select_macro {
/// a stream.
$select

};

($select:item $select_biased:item) => {
$crate::document_select_macro!($select);

/// Polls multiple futures and streams simultaneously, executing the branch
/// for the future that finishes first. Unlike [`select!`], if multiple futures are ready,
/// one will be selected in order of declaration. Futures directly
Expand Down Expand Up @@ -302,7 +307,7 @@ macro_rules! document_select_macro {
///
/// [`select!`]: macro.select.html
$select_biased
}
};
}

document_select_macro! {
Expand Down

0 comments on commit d88cc6f

Please sign in to comment.