Minor rewrites

This commit is contained in:
dasha_uwu
2026-01-17 17:35:58 +05:00
committed by Jason Volk
parent bb26b749ae
commit 3caab50e0d
6 changed files with 51 additions and 58 deletions

View File

@@ -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()