We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
bool::then_some
1 parent eac6c33 commit 9d0542bCopy full SHA for 9d0542b
library/core/src/bool.rs
@@ -6,6 +6,12 @@ impl bool {
6
/// Returns `Some(t)` if the `bool` is [`true`](../std/keyword.true.html),
7
/// or `None` otherwise.
8
///
9
+ /// Arguments passed to `then_some` are eagerly evaluated; if you are
10
+ /// passing the result of a function call, it is recommended to use
11
+ /// [`then`], which is lazily evaluated.
12
+ ///
13
+ /// [`then`]: bool::then
14
15
/// # Examples
16
17
/// ```
0 commit comments