1
Fork 0

Rollup merge of #109846 - matthiaskrgr:clippy2023_04_III, r=Nilstrieb

more clippy::complexity fixes (iter_kv_map, map_flatten, nonminimal_bool)
This commit is contained in:
Nilstrieb 2023-04-02 10:08:35 +02:00 committed by GitHub
commit 59f394bf86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 21 additions and 30 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)
};