From 3409645c3f2d9b8ec6336234d5519303abd28aa1 Mon Sep 17 00:00:00 2001 From: Johann Hemmann Date: Fri, 19 Jan 2024 13:10:29 +0100 Subject: [PATCH] bind_instead_of_map --- Cargo.toml | 1 - crates/hir/src/lib.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9564aaeccab..e2819016b07 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -167,7 +167,6 @@ enum_variant_names = "allow" new_ret_no_self = "allow" ## Following lints should be tackled at some point -bind_instead_of_map = "allow" borrowed_box = "allow" borrow_deref_ref = "allow" collapsible_if = "allow" diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs index 392ac56d615..8e0b0ff6adf 100644 --- a/crates/hir/src/lib.rs +++ b/crates/hir/src/lib.rs @@ -4300,7 +4300,7 @@ impl Type { ) -> impl Iterator + 'a { // iterate the lifetime self.as_adt() - .and_then(|a| a.lifetime(db).and_then(|lt| Some((<.name).to_smol_str()))) + .and_then(|a| a.lifetime(db).map(|lt| (<.name).to_smol_str())) .into_iter() // add the type and const parameters .chain(self.type_and_const_arguments(db))