Skip to content

Commit b8db431

Browse files
committed
avoid unnecessary collect()
1 parent ecdea9e commit b8db431

File tree

1 file changed

+1
-4
lines changed
  • compiler/rustc_hir_analysis/src/astconv

1 file changed

+1
-4
lines changed

compiler/rustc_hir_analysis/src/astconv/errors.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
408408
traits with associated type `{name}`, you could use the \
409409
fully-qualified path",
410410
),
411-
traits
412-
.iter()
413-
.map(|trait_str| format!("<Example as {trait_str}>::{name}"))
414-
.collect::<Vec<_>>(),
411+
traits.iter().map(|trait_str| format!("<Example as {trait_str}>::{name}")),
415412
Applicability::HasPlaceholders,
416413
);
417414
}

0 commit comments

Comments
 (0)