1
Fork 0

couple of clippy::perf fixes

This commit is contained in:
Matthias Krüger 2022-11-18 10:30:47 +01:00
parent 83356b78c4
commit e3036df003
11 changed files with 14 additions and 16 deletions

View file

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