Inline Attribute::has_name
This commit is contained in:
parent
5c6d3bf389
commit
1ba71abddd
|
@ -120,6 +120,7 @@ impl NestedMetaItem {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Attribute {
|
impl Attribute {
|
||||||
|
#[inline]
|
||||||
pub fn has_name(&self, name: Symbol) -> bool {
|
pub fn has_name(&self, name: Symbol) -> bool {
|
||||||
match self.kind {
|
match self.kind {
|
||||||
AttrKind::Normal(ref item, _) => item.path == name,
|
AttrKind::Normal(ref item, _) => item.path == name,
|
||||||
|
|
Loading…
Reference in New Issue