Inline Attribute::has_name

This commit is contained in:
Tomasz Miąsko 2021-03-11 00:00:00 +00:00
parent 5c6d3bf389
commit 1ba71abddd
1 changed files with 1 additions and 0 deletions

View File

@ -120,6 +120,7 @@ impl NestedMetaItem {
}
impl Attribute {
#[inline]
pub fn has_name(&self, name: Symbol) -> bool {
match self.kind {
AttrKind::Normal(ref item, _) => item.path == name,