We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 44d9445 + 0502ac2 commit 8c2e2fdCopy full SHA for 8c2e2fd
clippy_lints/src/map_clone.rs
@@ -14,8 +14,9 @@ use rustc_span::symbol::Ident;
14
use rustc_span::{sym, Span};
15
16
declare_clippy_lint! {
17
- /// **What it does:** Checks for usage of `iterator.map(|x| x.clone())` and suggests
18
- /// `iterator.cloned()` instead
+ /// **What it does:** Checks for usage of `map(|x| x.clone())` or
+ /// dereferencing closures for `Copy` types, on `Iterator` or `Option`,
19
+ /// and suggests `cloned()` or `copied()` instead
20
///
21
/// **Why is this bad?** Readability, this can be written more concisely
22
0 commit comments