Switch to any from count when checking for non_exhaustive attribute.
This commit is contained in:
parent
9527d6ade7
commit
d0d33a0335
|
@ -497,8 +497,7 @@ impl Item {
|
||||||
|
|
||||||
pub fn is_non_exhaustive(&self) -> bool {
|
pub fn is_non_exhaustive(&self) -> bool {
|
||||||
self.attrs.other_attrs.iter()
|
self.attrs.other_attrs.iter()
|
||||||
.filter(|a| a.name().as_str() == "non_exhaustive")
|
.any(|a| a.name().as_str() == "non_exhaustive")
|
||||||
.count() > 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a documentation-level item type from the item.
|
/// Returns a documentation-level item type from the item.
|
||||||
|
|
Loading…
Reference in New Issue