Minor rewrites
This commit is contained in:
@@ -183,16 +183,6 @@ impl Service {
|
||||
#[inline]
|
||||
pub async fn count(&self) -> usize { self.db.userid_password.count().await }
|
||||
|
||||
/// Returns an iterator over all users on this homeserver (offered for
|
||||
/// compatibility)
|
||||
#[allow(
|
||||
clippy::iter_without_into_iter,
|
||||
clippy::iter_not_returning_iterator
|
||||
)]
|
||||
pub fn iter(&self) -> impl Stream<Item = OwnedUserId> + Send + '_ {
|
||||
self.stream().map(ToOwned::to_owned)
|
||||
}
|
||||
|
||||
/// Returns an iterator over all users on this homeserver.
|
||||
pub fn stream(&self) -> impl Stream<Item = &UserId> + Send {
|
||||
self.db.userid_password.keys().ignore_err()
|
||||
|
||||
Reference in New Issue
Block a user