Skip to content

Commit

Permalink
macros: fix select! documentation formatting (#2283)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkczyz authored Feb 29, 2020
1 parent ecc23c0 commit 17a6f6f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tokio/src/macros/select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// The `select!` macro must be used inside of async functions, closures, and
/// blocks.
///
/// The `select` macro accepts one or more branches with the following pattern:
/// The `select!` macro accepts one or more branches with the following pattern:
///
/// ```text
/// <pattern> = <async expression> (, if <precondition>)? => <handler>,
Expand All @@ -24,7 +24,7 @@
/// expression.
///
/// Additionally, each branch may include an optional `if` precondition. This
/// precondition is evaluated **before** the <async expression>. If the
/// precondition is evaluated **before** the `<async expression>`. If the
/// precondition returns `false`, the branch is entirely disabled. This
/// capability is useful when using `select!` within a loop.
///
Expand All @@ -41,7 +41,7 @@
/// 4. Once an `<async expression>` returns a value, attempt to apply the value
/// to the provided `<pattern>`, if the pattern matches, evaluate `<handler>`
/// 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.
/// 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 none
/// is provided, panic.
///
Expand Down Expand Up @@ -210,7 +210,7 @@
/// }
/// ```
///
/// Using the same future in multiple select! expressions can be done by passing
/// Using the same future in multiple `select!` expressions can be done by passing
/// a reference to the future. Doing so requires the future to be [`Unpin`]. A
/// future can be made [`Unpin`] by either using [`Box::pin`] or stack pinning.
///
Expand Down

0 comments on commit 17a6f6f

Please sign in to comment.