diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-11-19 11:54:46 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-19 11:54:46 +0530 |
| commit | 3c6fc06906472969beffbede0c350044aa56b21b (patch) | |
| tree | 80601247b3ab12b085d677ff7f72f093d18ff779 /compiler/rustc_middle/src | |
| parent | 7f35493e9964f8d2e62ac127d2d948b60846109b (diff) | |
| parent | e3036df0032bb6726408a9f6705acaf38e55d59f (diff) | |
Rollup merge of #104566 - matthiaskrgr:clippy_perf_nov18, r=oli-obk
couple of clippy::perf fixes
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index 48e803597b0..93d6850560d 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -2194,11 +2194,9 @@ impl<'tcx> FmtPrinter<'_, 'tcx> { define_scoped_cx!(self); - let possible_names = - ('a'..='z').rev().map(|s| Symbol::intern(&format!("'{s}"))).collect::<Vec<_>>(); + let possible_names = ('a'..='z').rev().map(|s| Symbol::intern(&format!("'{s}"))); let mut available_names = possible_names - .into_iter() .filter(|name| !self.used_region_names.contains(&name)) .collect::<Vec<_>>(); debug!(?available_names); |
