Include "flatmap" in docs of Option::and_then
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:
parent
b6d91a2bda
commit
dab626b5be
@ -605,6 +605,8 @@ impl<T> Option<T> {
|
||||
/// Returns `None` if the option is `None`, otherwise calls `f` with the
|
||||
/// wrapped value and returns the result.
|
||||
///
|
||||
/// Some languages call this operation flatmap.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
/// ```
|
||||
|
Loading…
x
Reference in New Issue
Block a user