Rollup merge of #122633 - matthiaskrgr:col, r=fmease

avoid unnecessary collect()
This commit is contained in:
Matthias Krüger 2024-03-17 14:04:15 +01:00 committed by GitHub
commit 12137462b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,
);
}