mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-16 01:38:09 +00:00
Simplify attr_is_cfg in returns.rs
This commit is contained in:
parent
f8df4aed0f
commit
fa0a670201
1 changed files with 1 additions and 5 deletions
|
@ -150,9 +150,5 @@ impl EarlyLintPass for ReturnPass {
|
|||
}
|
||||
|
||||
fn attr_is_cfg(attr: &ast::Attribute) -> bool {
|
||||
if attr.meta_item_list().is_some() {
|
||||
attr.name().map_or(false, |n| n == "cfg")
|
||||
} else {
|
||||
false
|
||||
}
|
||||
attr.meta_item_list().is_some() && attr.name().map_or(false, |n| n == "cfg")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue