search_is_none
#6815
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
What it does
There is already a
search_is_some
lint.My suggestion is to add a lint for
find(...).is_none()
, suggesting to replace with!contains(...)
. Basically the same assearch_is_some
, but with negation.Categories (optional)
clippy::complexity
(same assearch_is_some
)What is the advantage of the recommended code over the original code
Example
Could be written as:
The text was updated successfully, but these errors were encountered: