Skip to content

Commit 1dc2057

Browse files
committed
fmt
Signed-off-by: Yoshua Wuyts <[email protected]>
1 parent 679da06 commit 1dc2057

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/future/mod.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//!
55
//! Often it's desireable to await multiple futures as if it was a single
66
//! future. The `join` family of operations converts multiple futures into a
7-
//! single future that returns all of their outputs. The `select` family of
7+
//! single future that returns all of their outputs. The `race` family of
88
//! operations converts multiple future into a single future that returns the
99
//! first output.
1010
//!
@@ -13,7 +13,7 @@
1313
//! | Name | Return signature | When does it return? |
1414
//! | --- | --- | --- |
1515
//! | [`future::join!`] | `(T1, T2)` | Wait for all to complete
16-
//! | [`Future::select`] | `T` | Return on first value
16+
//! | [`Future::race`] | `T` | Return on first value
1717
//!
1818
//! ## Fallible Futures Concurrency
1919
//!
@@ -25,9 +25,9 @@
2525
//! futures are dropped and an error is returned. This is referred to as
2626
//! "short-circuiting".
2727
//!
28-
//! In the case of `try_select`, instead of returning the first future that
28+
//! In the case of `try_race`, instead of returning the first future that
2929
//! completes it returns the first future that _successfully_ completes. This
30-
//! means `try_select` will keep going until any one of the futures returns
30+
//! means `try_race` will keep going until any one of the futures returns
3131
//! `Ok`, or _all_ futures have returned `Err`.
3232
//!
3333
//! However sometimes it can be useful to use the base variants of the macros
@@ -38,13 +38,13 @@
3838
//! | --- | --- | --- |
3939
//! | [`future::join!`] | `(Result<T, E>, Result<T, E>)` | Wait for all to complete
4040
//! | [`future::try_join!`] | `Result<(T1, T2), E>` | Return on first `Err`, wait for all to complete
41-
//! | [`Future::select`] | `Result<T, E>` | Return on first value
42-
//! | [`Future::try_select`] | `Result<T, E>` | Return on first `Ok`, reject on last Err
41+
//! | [`Future::race`] | `Result<T, E>` | Return on first value
42+
//! | [`Future::try_race`] | `Result<T, E>` | Return on first `Ok`, reject on last Err
4343
//!
4444
//! [`future::join!`]: macro.join.html
4545
//! [`future::try_join!`]: macro.try_join.html
46-
//! [`Future::select`]: trait.Future.html#method.select
47-
//! [`Future::try_select`]: trait.Future.html#method.try_select
46+
//! [`Future::race`]: trait.Future.html#method.race
47+
//! [`Future::try_race`]: trait.Future.html#method.try_race
4848
4949
#[doc(inline)]
5050
pub use async_macros::{join, try_join};

src/stream/stream/min.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
use std::cmp::{Ord, Ordering};
12
use std::marker::PhantomData;
2-
use std::cmp::{Ordering, Ord};
33
use std::pin::Pin;
44

55
use pin_project_lite::pin_project;

0 commit comments

Comments
 (0)