1
Fork 0

avoid collecting into vecs in some places

This commit is contained in:
Matthias Krüger 2024-03-02 14:18:47 +01:00
parent 2e3581bca9
commit 7a48987006
5 changed files with 20 additions and 33 deletions

View file

@ -860,10 +860,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
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,
);
}