1
Fork 0

Document eager evaluation of bool::then_some argument

This commit is contained in:
Adam-Gleave 2022-09-01 16:09:25 +01:00
parent eac6c33bc6
commit 9d0542b76d

View file

@ -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
///
/// ```