-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy
Description
It's pretty much the same as #4033. The closure argument of any
needs one dereference less than the closure argument of find
.
fn main() {
let vec = vec![1];
let _ = vec.iter().find(|x| **x == 0).is_some();
// let _ = vec.iter().any(|x| **x == 0); // <- this is suggested
let _ = vec.iter().any(|x| *x == 0); // <- this should be suggested
}
Originally posted by @BO41 in #4436 (comment)
Metadata
Metadata
Assignees
Labels
C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesCategory: Enhancement of lints, like adding more cases or adding help messagesL-suggestionLint: Improving, adding or fixing lint suggestionsLint: Improving, adding or fixing lint suggestionsgood first issueThese issues are a good way to get started with ClippyThese issues are a good way to get started with Clippy