rust/tests
bors 8151a17422 Auto merge of #4049 - airt:fix-4033-search_is_some, r=flip1995
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 😺
2019-05-02 08:45:02 +00:00
..
auxiliary
ui Auto merge of #4049 - airt:fix-4033-search_is_some, r=flip1995 2019-05-02 08:45:02 +00:00
ui-toml
compile-test.rs Update find(p).map(p) occurrences to use find_map(p) 2019-04-30 16:45:32 -03:00
dogfood.rs use clippy-preview instead of clippy in cargo 2019-04-30 18:29:25 -07:00
matches.rs
missing-test-files.rs
needless_continue_helpers.rs
versioncheck.rs