diff options
| author | David Wood <david@davidtw.co> | 2018-07-13 08:36:01 +0100 |
|---|---|---|
| committer | David Wood <david@davidtw.co> | 2018-07-13 08:36:01 +0100 |
| commit | d0d33a03351433b7c27ae03e17bf18ad627379fe (patch) | |
| tree | 67c43fef37373bc0809defb11c38efca3d4d8d8e | |
| parent | 9527d6ade742ac6d06cc110afc10d66a9ae1c101 (diff) | |
| download | rust-d0d33a03351433b7c27ae03e17bf18ad627379fe.tar.gz rust-d0d33a03351433b7c27ae03e17bf18ad627379fe.zip | |
Switch to any from count when checking for non_exhaustive attribute.
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index a47213a62a5..87f52d2cfa2 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -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. |
