rust/clippy_lints
bors 83bb5ecec8 Auto merge of #6202 - giraffate:fix_invalid_suggestion_in_needless_collect_test, r=flip1995
Fix an invalid suggestion in `needless_collect` test

A test, https://github.com/rust-lang/rust-clippy/blob/master/tests/ui/needless_collect_indirect.rs#L11-L12, suggests following codes, but the suggested codes don't work. An example is here: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6947d9f2806a83f41cc5eb8e39b09d0b.
```
error: avoid using `collect()` when not needed
  --> $DIR/needless_collect_indirect.rs:11:5
   |
LL | /     let indirect_contains = sample.iter().collect::<VecDeque<_>>();
LL | |     indirect_contains.contains(&&5);
   | |____^
   |
help: Check if the original Iterator contains an element instead of collecting then checking
   |
LL |
LL |     sample.iter().any(|x| x == &&5);
```

changelog: none
2020-10-25 17:35:33 +00:00
..
src Auto merge of #6202 - giraffate:fix_invalid_suggestion_in_needless_collect_test, r=flip1995 2020-10-25 17:35:33 +00:00
Cargo.toml Merge commit 'bf1c6f9871f430e284b17aa44059e0d0395e28a6' into clippyup 2020-10-23 22:16:59 +02:00
README.md clippy_lints: readme: don't mention crates.io since it is no longer used to publish clippy. 2020-03-10 01:05:54 +01:00

This crate contains Clippy lints. For the main crate, check GitHub.