Skip to content

Commit

Permalink
Use Level::from_symbol in unnecessary_clippy_cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
flip1995 committed Feb 22, 2024
1 parent 6591dc6 commit cc6dcaa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions clippy_lints/src/attrs.rs
Expand Up @@ -1000,9 +1000,7 @@ fn check_clippy_cfg_attr(
) {
if cfg_attr.has_name(sym::clippy)
&& let Some(ident) = behind_cfg_attr.ident()
// FIXME: replace with `from_symbol` once https://github.com/rust-lang/rust/pull/121230
// is merged.
&& Level::from_str(ident.name.as_str()).is_some()
&& Level::from_symbol(ident.name, Some(attr.id)).is_some()
&& let Some(items) = behind_cfg_attr.meta_item_list()
{
let nb_items = items.len();
Expand Down

0 comments on commit cc6dcaa

Please sign in to comment.