From 4579918d1fc8db8aeeb7463fa0f19bf55d3e5257 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Thu, 19 Mar 2026 09:10:35 +0100 Subject: [PATCH] chore(sdk): Simplify code in `RoomPagination`. This patch simply inlines a variable definition to simplify the code. --- .../src/event_cache/caches/room/pagination.rs | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/crates/matrix-sdk/src/event_cache/caches/room/pagination.rs b/crates/matrix-sdk/src/event_cache/caches/room/pagination.rs index f2c31ab9e..12e24744f 100644 --- a/crates/matrix-sdk/src/event_cache/caches/room/pagination.rs +++ b/crates/matrix-sdk/src/event_cache/caches/room/pagination.rs @@ -361,18 +361,14 @@ impl PaginatedCache for Arc { in_memory_duplicated_event_ids, in_store_duplicated_event_ids, non_empty_all_duplicates: all_duplicates, - } = { - let room_linked_chunk = state.room_linked_chunk(); - - filter_duplicate_events( - &state.state.own_user_id, - &state.store, - LinkedChunkId::Room(&state.state.room_id), - room_linked_chunk, - events, - ) - .await? - }; + } = filter_duplicate_events( + &state.state.own_user_id, + &state.store, + LinkedChunkId::Room(&state.state.room_id), + state.room_linked_chunk(), + events, + ) + .await?; // If not all the events have been back-paginated, we need to remove the // previous ones, otherwise we can end up with misordered events.