Skip to content

Commit

Permalink
clippy::flat_map_identity
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jul 25, 2021
1 parent 053aedc commit d0a8a12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_lint/src/levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d0a8a12

Please sign in to comment.