Skip to content

Commit d0d33a0

Browse files
committed
Switch to any from count when checking for non_exhaustive attribute.
1 parent 9527d6a commit d0d33a0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/librustdoc/clean/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,7 @@ impl Item {
497497

498498
pub fn is_non_exhaustive(&self) -> bool {
499499
self.attrs.other_attrs.iter()
500-
.filter(|a| a.name().as_str() == "non_exhaustive")
501-
.count() > 0
500+
.any(|a| a.name().as_str() == "non_exhaustive")
502501
}
503502

504503
/// Returns a documentation-level item type from the item.

0 commit comments

Comments
 (0)