Skip to content

Commit ddf23d6

Browse files
pitiK3Uflip1995
authored andcommitted
Fix: Use .collect() instead of ::fromIterator()
1 parent 52d1ea3 commit ddf23d6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clippy_lints/src/lifetimes.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use rustc_middle::hir::map::Map;
1616
use rustc_session::{declare_lint_pass, declare_tool_lint};
1717
use rustc_span::source_map::Span;
1818
use rustc_span::symbol::{kw, Symbol};
19-
use std::iter::FromIterator;
2019

2120
declare_clippy_lint! {
2221
/// **What it does:** Checks for lifetime annotations which can be removed by
@@ -214,14 +213,15 @@ fn could_use_elision<'tcx>(
214213
}
215214

216215
if allowed_lts
217-
.intersection(&FxHashSet::from_iter(
218-
input_visitor
216+
.intersection(
217+
&input_visitor
219218
.nested_elision_site_lts
220219
.iter()
221220
.chain(output_visitor.nested_elision_site_lts.iter())
222221
.cloned()
223-
.filter(|v| matches!(v, RefLt::Named(_))),
224-
))
222+
.filter(|v| matches!(v, RefLt::Named(_)))
223+
.collect(),
224+
)
225225
.next()
226226
.is_some()
227227
{

0 commit comments

Comments
 (0)