fix needless collect

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-07-07 07:39:18 +00:00
parent dfd13780df
commit 5722c4ae39
5 changed files with 10 additions and 20 deletions

View file

@ -319,7 +319,9 @@ impl Data {
/// Returns an iterator of all joined members of a room.
#[tracing::instrument(skip(self))]
pub(super) fn room_members<'a>(&'a self, room_id: &RoomId) -> Box<dyn Iterator<Item = Result<OwnedUserId>> + 'a> {
pub(super) fn room_members<'a>(
&'a self, room_id: &RoomId,
) -> Box<dyn Iterator<Item = Result<OwnedUserId>> + Send + 'a> {
let mut prefix = room_id.as_bytes().to_vec();
prefix.push(0xFF);

View file

@ -292,7 +292,7 @@ impl Service {
/// Returns an iterator over all joined members of a room.
#[tracing::instrument(skip(self))]
pub fn room_members(&self, room_id: &RoomId) -> impl Iterator<Item = Result<OwnedUserId>> + '_ {
pub fn room_members(&self, room_id: &RoomId) -> impl Iterator<Item = Result<OwnedUserId>> + Send + '_ {
self.db.room_members(room_id)
}