Document eager evaluation of bool::then_some
argument
This commit is contained in:
parent
eac6c33bc6
commit
9d0542b76d
1 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,12 @@ impl bool {
|
|||
/// Returns `Some(t)` if the `bool` is [`true`](../std/keyword.true.html),
|
||||
/// or `None` otherwise.
|
||||
///
|
||||
/// Arguments passed to `then_some` are eagerly evaluated; if you are
|
||||
/// passing the result of a function call, it is recommended to use
|
||||
/// [`then`], which is lazily evaluated.
|
||||
///
|
||||
/// [`then`]: bool::then
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue