Implement `ExactSizeIterator` for OAuthUserIter
This adds an implementation of the `ExactSizeIterator` for the
`OAuthUserIter` struct, returned by the `/oauth/users` endpoint.
@@ -431,3 +431,10 @@ impl Iterator for OAuthUserIter {
(self.inner.len(), Some(self.inner.len()))
}
}
+
+#[cfg(feature = "oauth-user-list")]
+impl ExactSizeIterator for OAuthUserIter {
+ fn len(&self) -> usize {
+ self.inner.len()
+ }
+}
