Skip to content

Commit

Permalink
Rollup merge of rust-lang#122633 - matthiaskrgr:col, r=fmease
Browse files Browse the repository at this point in the history
avoid unnecessary collect()
  • Loading branch information
matthiaskrgr committed Mar 17, 2024
2 parents 2448162 + b8db431 commit 1213746
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions compiler/rustc_hir_analysis/src/astconv/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,7 @@ impl<'tcx> dyn AstConv<'tcx> + '_ {
traits with associated type `{name}`, you could use the \
fully-qualified path",
),
traits
.iter()
.map(|trait_str| format!("<Example as {trait_str}>::{name}"))
.collect::<Vec<_>>(),
traits.iter().map(|trait_str| format!("<Example as {trait_str}>::{name}")),
Applicability::HasPlaceholders,
);
}
Expand Down

0 comments on commit 1213746

Please sign in to comment.