mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-27 15:12:56 +00:00
Rollup merge of #22111 - robinst:option-docs-flatmap, r=steveklabnik
Some newcomers might look for a "flatMap" method on Option. Include the reference so that searching the page would find "and_then".
This commit is contained in:
commit
e4e4afa92d
@ -605,6 +605,8 @@ impl<T> Option<T> {
|
|||||||
/// Returns `None` if the option is `None`, otherwise calls `f` with the
|
/// Returns `None` if the option is `None`, otherwise calls `f` with the
|
||||||
/// wrapped value and returns the result.
|
/// wrapped value and returns the result.
|
||||||
///
|
///
|
||||||
|
/// Some languages call this operation flatmap.
|
||||||
|
///
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
Loading…
Reference in New Issue
Block a user