From d88cc6f4bd3206428b018140edf2ef6747f439b0 Mon Sep 17 00:00:00 2001 From: Wim Looman Date: Tue, 4 Feb 2020 20:07:28 +0100 Subject: [PATCH] Fix compatibility of futures-util with futures 0.3.1 --- futures-util/src/async_await/select_mod.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/futures-util/src/async_await/select_mod.rs b/futures-util/src/async_await/select_mod.rs index 628c68379f..5df8846ef8 100644 --- a/futures-util/src/async_await/select_mod.rs +++ b/futures-util/src/async_await/select_mod.rs @@ -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 @@ -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 @@ -302,7 +307,7 @@ macro_rules! document_select_macro { /// /// [`select!`]: macro.select.html $select_biased - } + }; } document_select_macro! {