style(presence): use flat_map instead of matching Results in filter

This commit is contained in:
Jakub Kubík 2023-12-20 12:04:47 +01:00 committed by strawberry
parent e93b4aa08e
commit 69025d30f7
5 changed files with 9 additions and 16 deletions

View file

@ -122,11 +122,11 @@ impl Service {
}
/// Returns the most recent presence updates that happened after the event with id `since`.
pub fn presence_since<'a>(
&'a self,
pub fn presence_since(
&self,
room_id: &RoomId,
since: u64,
) -> Box<dyn Iterator<Item = Result<(OwnedUserId, u64, PresenceEvent)>> + 'a> {
) -> Box<dyn Iterator<Item = (OwnedUserId, u64, PresenceEvent)>> {
self.db.presence_since(room_id, since)
}
}