Skip to content

Commit

Permalink
Fix documentation example for unnecessary_filter_map.
Browse files Browse the repository at this point in the history
  • Loading branch information
lily-commure committed Dec 19, 2019
1 parent 584f95f commit 6e8c2bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,11 +958,11 @@ declare_clippy_lint! {
/// ```
///
/// ```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:
/// ```rust
/// let _ = (0..4).map(i32::checked_abs);
/// let _ = (0..4).map(|x| x + 1);
/// ```
pub UNNECESSARY_FILTER_MAP,
complexity,
Expand Down

0 comments on commit 6e8c2bf

Please sign in to comment.