mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-27 14:24:08 +00:00
Simplify attr_is_cfg in returns.rs
This commit is contained in:
parent
f8df4aed0f
commit
fa0a670201
@ -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 New Issue
Block a user