diff --git a/src/future/mod.rs b/src/future/mod.rs index 7789ddee3..a799d8de1 100644 --- a/src/future/mod.rs +++ b/src/future/mod.rs @@ -4,7 +4,7 @@ //! //! Often it's desireable to await multiple futures as if it was a single //! future. The `join` family of operations converts multiple futures into a -//! single future that returns all of their outputs. The `select` family of +//! single future that returns all of their outputs. The `race` family of //! operations converts multiple future into a single future that returns the //! first output. //! @@ -13,7 +13,7 @@ //! | Name | Return signature | When does it return? | //! | --- | --- | --- | //! | [`future::join!`] | `(T1, T2)` | Wait for all to complete -//! | [`Future::select`] | `T` | Return on first value +//! | [`Future::race`] | `T` | Return on first value //! //! ## Fallible Futures Concurrency //! @@ -25,9 +25,9 @@ //! futures are dropped and an error is returned. This is referred to as //! "short-circuiting". //! -//! In the case of `try_select`, instead of returning the first future that +//! In the case of `try_race`, instead of returning the first future that //! completes it returns the first future that _successfully_ completes. This -//! means `try_select` will keep going until any one of the futures returns +//! means `try_race` will keep going until any one of the futures returns //! `Ok`, or _all_ futures have returned `Err`. //! //! However sometimes it can be useful to use the base variants of the macros @@ -38,13 +38,13 @@ //! | --- | --- | --- | //! | [`future::join!`] | `(Result, Result)` | Wait for all to complete //! | [`future::try_join!`] | `Result<(T1, T2), E>` | Return on first `Err`, wait for all to complete -//! | [`Future::select`] | `Result` | Return on first value -//! | [`Future::try_select`] | `Result` | Return on first `Ok`, reject on last Err +//! | [`Future::race`] | `Result` | Return on first value +//! | [`Future::try_race`] | `Result` | Return on first `Ok`, reject on last Err //! //! [`future::join!`]: macro.join.html //! [`future::try_join!`]: macro.try_join.html -//! [`Future::select`]: trait.Future.html#method.select -//! [`Future::try_select`]: trait.Future.html#method.try_select +//! [`Future::race`]: trait.Future.html#method.race +//! [`Future::try_race`]: trait.Future.html#method.try_race #[doc(inline)] pub use async_macros::{join, try_join}; diff --git a/src/stream/stream/min.rs b/src/stream/stream/min.rs index 1ab56065d..b4a8c7c16 100644 --- a/src/stream/stream/min.rs +++ b/src/stream/stream/min.rs @@ -1,5 +1,5 @@ +use std::cmp::{Ord, Ordering}; use std::marker::PhantomData; -use std::cmp::{Ordering, Ord}; use std::pin::Pin; use pin_project_lite::pin_project;