From d0a8a12dc60cb87325386be73aad7a398e1d30b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Wed, 21 Jul 2021 22:00:44 +0200 Subject: [PATCH] clippy::flat_map_identity --- compiler/rustc_lint/src/levels.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_lint/src/levels.rs b/compiler/rustc_lint/src/levels.rs index 069fa41fa886a..187e54154e3df 100644 --- a/compiler/rustc_lint/src/levels.rs +++ b/compiler/rustc_lint/src/levels.rs @@ -576,7 +576,7 @@ pub fn is_known_lint_tool(m_item: Symbol, sess: &Session, attrs: &[ast::Attribut // NOTE: does no error handling; error handling is done by rustc_resolve. sess.filter_by_name(attrs, sym::register_tool) .filter_map(|attr| attr.meta_item_list()) - .flat_map(std::convert::identity) + .flatten() .filter_map(|nested_meta| nested_meta.ident()) .map(|ident| ident.name) .any(|name| name == m_item)