diff options
| author | Piti the little Light <djhlinacz@gmail.com> | 2020-10-24 13:53:09 +0200 |
|---|---|---|
| committer | flip1995 <philipp.krones@embecosm.com> | 2020-11-03 16:44:24 +0100 |
| commit | ddf23d649ae02dde7aed22ec6699a736492b7184 (patch) | |
| tree | 235b67bd3541f85bb47145cea006aa72be6b7f15 | |
| parent | 52d1ea3c9ad8ea97350ba7a0ca0a8e172cfcae78 (diff) | |
| download | rust-ddf23d649ae02dde7aed22ec6699a736492b7184.tar.gz rust-ddf23d649ae02dde7aed22ec6699a736492b7184.zip | |
Fix: Use `.collect()` instead of `::fromIterator()`
| -rw-r--r-- | clippy_lints/src/lifetimes.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clippy_lints/src/lifetimes.rs b/clippy_lints/src/lifetimes.rs index c8a5a9c9431..4d737b3f49b 100644 --- a/clippy_lints/src/lifetimes.rs +++ b/clippy_lints/src/lifetimes.rs @@ -16,7 +16,6 @@ use rustc_middle::hir::map::Map; use rustc_session::{declare_lint_pass, declare_tool_lint}; use rustc_span::source_map::Span; use rustc_span::symbol::{kw, Symbol}; -use std::iter::FromIterator; declare_clippy_lint! { /// **What it does:** Checks for lifetime annotations which can be removed by @@ -214,14 +213,15 @@ fn could_use_elision<'tcx>( } if allowed_lts - .intersection(&FxHashSet::from_iter( - input_visitor + .intersection( + &input_visitor .nested_elision_site_lts .iter() .chain(output_visitor.nested_elision_site_lts.iter()) .cloned() - .filter(|v| matches!(v, RefLt::Named(_))), - )) + .filter(|v| matches!(v, RefLt::Named(_))) + .collect(), + ) .next() .is_some() { |
