mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-13 04:06:54 +00:00
style(presence): use flat_map instead of matching Results in filter
This commit is contained in:
1 parent
e93b4aa08e
commit
69025d30f7
5 files changed
+9
-16
No files matched your search
@@ -537,14 +537,12 @@ async fn process_room_presence_updates(
|
||||
since: u64,
|
||||
) -> Result<()> {
|
||||
// Take presence updates from this room
|
||||
for presence_data in services()
|
||||
for (user_id, _, presence_event) in services()
|
||||
.rooms
|
||||
.edus
|
||||
.presence
|
||||
.presence_since(room_id, since)
|
||||
{
|
||||
let (user_id, _, presence_event) = presence_data?;
|
||||
|
||||
match presence_updates.entry(user_id) {
|
||||
Entry::Vacant(slot) => {
|
||||
slot.insert(presence_event);
|
||||
|
||||
Reference in new issue
Block a user