1
Fork 0

fix clippy::iter_kv_map

This commit is contained in:
Matthias Krüger 2023-04-01 23:44:16 +02:00
parent 0196c2bd27
commit ac229c2819
7 changed files with 10 additions and 15 deletions

View file

@ -978,7 +978,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
let (_, sig, reg) = ty::print::FmtPrinter::new(self.tcx, Namespace::TypeNS)
.name_all_regions(sig)
.unwrap();
let lts: Vec<String> = reg.into_iter().map(|(_, kind)| kind.to_string()).collect();
let lts: Vec<String> = reg.into_values().map(|kind| kind.to_string()).collect();
(if lts.is_empty() { String::new() } else { format!("for<{}> ", lts.join(", ")) }, sig)
};