Skip to content

Commit

Permalink
Fix: Use .collect() instead of ::fromIterator()
Browse files Browse the repository at this point in the history
  • Loading branch information
pitiK3U authored and flip1995 committed Nov 3, 2020
1 parent 52d1ea3 commit ddf23d6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions clippy_lints/src/lifetimes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
{
Expand Down

0 comments on commit ddf23d6

Please sign in to comment.