Fix documentation example for unnecessary_filter_map.

This commit is contained in:
Lily Chung 2019-12-19 15:48:17 -08:00
parent 584f95fc54
commit 6e8c2bf8e6
1 changed files with 2 additions and 2 deletions

View File

@ -958,11 +958,11 @@ declare_clippy_lint! {
/// ``` /// ```
/// ///
/// ```rust /// ```rust
/// let _ = (0..4).filter_map(i32::checked_abs); /// let _ = (0..4).filter_map(|x| Some(x + 1));
/// ``` /// ```
/// As there is no conditional check on the argument this could be written as: /// As there is no conditional check on the argument this could be written as:
/// ```rust /// ```rust
/// let _ = (0..4).map(i32::checked_abs); /// let _ = (0..4).map(|x| x + 1);
/// ``` /// ```
pub UNNECESSARY_FILTER_MAP, pub UNNECESSARY_FILTER_MAP,
complexity, complexity,