From 77180f14c4dfee1d188c49a62ce66f49bb1d971c Mon Sep 17 00:00:00 2001 From: Rafael Bachmann Date: Tue, 13 Aug 2024 22:47:00 +0200 Subject: [PATCH] macros: improve documentation for `select!` Refs: #6572 --- tokio/src/macros/select.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tokio/src/macros/select.rs b/tokio/src/macros/select.rs index 5e3b661415b..d1e59d34736 100644 --- a/tokio/src/macros/select.rs +++ b/tokio/src/macros/select.rs @@ -39,13 +39,13 @@ macro_rules! doc { /// 2. Aggregate the ``s from each branch, including the /// disabled ones. If the branch is disabled, `` is still /// evaluated, but the resulting future is not polled. - /// 3. Concurrently await on the results for all remaining ``s. - /// 4. Once an `` returns a value, attempt to apply the value - /// to the provided ``, if the pattern matches, evaluate `` - /// and return. If the pattern **does not** match, disable the current branch - /// and for the remainder of the current call to `select!`. Continue from step 3. - /// 5. If **all** branches are disabled, evaluate the `else` expression. If no - /// else branch is provided, panic. + /// 3. If **all** branches are disabled: go to step 6. + /// 4. Concurrently await on the results for all remaining ``s. + /// 5. Once an `` returns a value, attempt to apply the value to the + /// provided ``. If the pattern matches, evaluate the `` and return. + /// If the pattern **does not** match, disable the current branch for the remainder of + /// the current call to `select!`. Continue from step 3. + /// 6. Evaluate the `else` expression. If no else expression is provided, panic. /// /// # Runtime characteristics ///