Skip to content

Commit 0502ac2

Browse files
committed
Improve doc about map_clone
1 parent 44d9445 commit 0502ac2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clippy_lints/src/map_clone.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ use rustc_span::symbol::Ident;
1414
use rustc_span::{sym, Span};
1515

1616
declare_clippy_lint! {
17-
/// **What it does:** Checks for usage of `iterator.map(|x| x.clone())` and suggests
18-
/// `iterator.cloned()` instead
17+
/// **What it does:** Checks for usage of `map(|x| x.clone())` or
18+
/// dereferencing closures for `Copy` types, on `Iterator` or `Option`,
19+
/// and suggests `cloned()` or `copied()` instead
1920
///
2021
/// **Why is this bad?** Readability, this can be written more concisely
2122
///

0 commit comments

Comments
 (0)