diff options
| author | bors <bors@rust-lang.org> | 2019-12-20 07:27:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-12-20 07:27:24 +0000 |
| commit | b4ad56e5c4830f55d025b894067668d4eb9d5ce6 (patch) | |
| tree | da592272612ab79a70b1f59b4f129ce3a33afa67 /clippy_lints/src/methods | |
| parent | a86463c99fd7033ba5dc0ed16ec53c2e81637767 (diff) | |
| parent | 6e8c2bf8e6d7b482ac347af50a9a2864e5e91d84 (diff) | |
| download | rust-b4ad56e5c4830f55d025b894067668d4eb9d5ce6.tar.gz rust-b4ad56e5c4830f55d025b894067668d4eb9d5ce6.zip | |
Auto merge of #4920 - lily-commure:fix-unnecessary-filter-map-docs, r=phansch
Fix documentation example for unnecessary_filter_map. Fixes #4919. changelog: none
Diffstat (limited to 'clippy_lints/src/methods')
| -rw-r--r-- | clippy_lints/src/methods/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 7f35eeee641..2b611bf823e 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -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, |
