Skip to content

Commit

Permalink
Switch to any from count when checking for non_exhaustive attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtwco committed Jul 13, 2018
1 parent 9527d6a commit d0d33a0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/librustdoc/clean/mod.rs
Expand Up @@ -497,8 +497,7 @@ impl Item {

pub fn is_non_exhaustive(&self) -> bool {
self.attrs.other_attrs.iter()
.filter(|a| a.name().as_str() == "non_exhaustive")
.count() > 0
.any(|a| a.name().as_str() == "non_exhaustive")
}

/// Returns a documentation-level item type from the item.
Expand Down

0 comments on commit d0d33a0

Please sign in to comment.