8151a17422
Fix #4033 search_is_some Fixes #4033. Suggest `any(|x| ..)` instead of `any(|&x| ..)` for `find(|&x| ..).is_some()` (Lint [search_is_some](https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some)) FnDecl of `find`: ```rust fn find<P>(&mut self, mut p: P) -> Option<Self::Item> where P: FnMut(&Self::Item) -> bool ``` FnDecl of `any`: ```rust fn any<F>(&mut self, mut f: F) -> bool where F: FnMut(Self::Item) -> bool ``` If match on `|&_|` in closure of `find`, only use `|_|` in the suggestion. PS. It's the first time that I have used the `hir` API, please correct me if there is any mistake 😺 |
||
---|---|---|
.. | ||
auxiliary | ||
ui | ||
ui-toml | ||
compile-test.rs | ||
dogfood.rs | ||
matches.rs | ||
missing-test-files.rs | ||
needless_continue_helpers.rs | ||
versioncheck.rs |