diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-17 12:19:46 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-17 12:19:46 +0100 |
| commit | b8db431f37e097a545f364335fdcd5f65c056cb7 (patch) | |
| tree | d31e84e330cb6e176e6933223df59768dead68d6 | |
| parent | ecdea9e9438cdb8cf707e7f60e066eda02344d05 (diff) | |
| download | rust-b8db431f37e097a545f364335fdcd5f65c056cb7.tar.gz rust-b8db431f37e097a545f364335fdcd5f65c056cb7.zip | |
avoid unnecessary collect()
| -rw-r--r-- | compiler/rustc_hir_analysis/src/astconv/errors.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_hir_analysis/src/astconv/errors.rs b/compiler/rustc_hir_analysis/src/astconv/errors.rs index 37fbf45235a..68896768e8d 100644 --- a/compiler/rustc_hir_analysis/src/astconv/errors.rs +++ b/compiler/rustc_hir_analysis/src/astconv/errors.rs @@ -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, ); } |
