Skip to content

Commit 39c3c19

Browse files
authored
macros: improve documentation for select! (#6774)
1 parent 694577f commit 39c3c19

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tokio/src/macros/select.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ macro_rules! doc {
3939
/// 2. Aggregate the `<async expression>`s from each branch, including the
4040
/// disabled ones. If the branch is disabled, `<async expression>` is still
4141
/// evaluated, but the resulting future is not polled.
42-
/// 3. Concurrently await on the results for all remaining `<async expression>`s.
43-
/// 4. Once an `<async expression>` returns a value, attempt to apply the value
44-
/// to the provided `<pattern>`, if the pattern matches, evaluate `<handler>`
45-
/// and return. If the pattern **does not** match, disable the current branch
46-
/// and for the remainder of the current call to `select!`. Continue from step 3.
47-
/// 5. If **all** branches are disabled, evaluate the `else` expression. If no
48-
/// else branch is provided, panic.
42+
/// 3. If **all** branches are disabled: go to step 6.
43+
/// 4. Concurrently await on the results for all remaining `<async expression>`s.
44+
/// 5. Once an `<async expression>` returns a value, attempt to apply the value to the
45+
/// provided `<pattern>`. If the pattern matches, evaluate the `<handler>` and return.
46+
/// If the pattern **does not** match, disable the current branch for the remainder of
47+
/// the current call to `select!`. Continue from step 3.
48+
/// 6. Evaluate the `else` expression. If no else expression is provided, panic.
4949
///
5050
/// # Runtime characteristics
5151
///

0 commit comments

Comments
 (0)