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:
Manish Goregaokar 2015-02-17 15:41:30 +05:30
commit e4e4afa92d

View File

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