Fix documentation example for unnecessary_filter_map.
This commit is contained in:
parent
584f95fc54
commit
6e8c2bf8e6
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue