Skip to content

Commit

Permalink
Auto merge of rust-lang#4920 - lily-commure:fix-unnecessary-filter-ma…
Browse files Browse the repository at this point in the history
…p-docs, r=phansch

Fix documentation example for unnecessary_filter_map.

Fixes rust-lang#4919.

changelog: none
  • Loading branch information
bors committed Dec 20, 2019
2 parents a86463c + 6e8c2bf commit b4ad56e
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 @@ -977,11 +977,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 b4ad56e

Please sign in to comment.