From c3ea2c37360db4b1f00a0ce58a00ab364f3847f1 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 28 Nov 2023 18:53:06 +0100 Subject: [PATCH] Format with rustfmt nightly. --- crates/matrix-sdk-base/src/rooms/normal.rs | 5 +++-- crates/matrix-sdk-ui/src/timeline/inner/mod.rs | 3 ++- .../matrix-sdk-ui/src/timeline/read_receipts.rs | 15 ++++++++------- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/crates/matrix-sdk-base/src/rooms/normal.rs b/crates/matrix-sdk-base/src/rooms/normal.rs index 4aade1700..715e339b3 100644 --- a/crates/matrix-sdk-base/src/rooms/normal.rs +++ b/crates/matrix-sdk-base/src/rooms/normal.rs @@ -695,8 +695,9 @@ impl Room { self.store.get_user_room_receipt_event(self.room_id(), receipt_type, thread, user_id).await } - /// Load from storage the receipts as a list of `OwnedUserId` and `Receipt` tuples for the - /// given `receipt_type`, `thread` and `event_id` in this room. + /// Load from storage the receipts as a list of `OwnedUserId` and `Receipt` + /// tuples for the given `receipt_type`, `thread` and `event_id` in this + /// room. pub async fn load_event_receipts( &self, receipt_type: ReceiptType, diff --git a/crates/matrix-sdk-ui/src/timeline/inner/mod.rs b/crates/matrix-sdk-ui/src/timeline/inner/mod.rs index a256f76d0..2c063b9cd 100644 --- a/crates/matrix-sdk-ui/src/timeline/inner/mod.rs +++ b/crates/matrix-sdk-ui/src/timeline/inner/mod.rs @@ -292,7 +292,8 @@ impl TimelineInner

{ Ok(result) } - /// Populates our own latest read receipt in the in-memory by-user read receipt cache. + /// Populates our own latest read receipt in the in-memory by-user read + /// receipt cache. pub(super) async fn populate_initial_user_receipt(&mut self, receipt_type: ReceiptType) { let own_user_id = self.room_data_provider.own_user_id().to_owned(); diff --git a/crates/matrix-sdk-ui/src/timeline/read_receipts.rs b/crates/matrix-sdk-ui/src/timeline/read_receipts.rs index ca416f584..2ec11cde1 100644 --- a/crates/matrix-sdk-ui/src/timeline/read_receipts.rs +++ b/crates/matrix-sdk-ui/src/timeline/read_receipts.rs @@ -59,8 +59,8 @@ impl ReadReceipts { self.users_read_receipts.clear(); } - /// Read the latest read receipt of the given type for the given user, from the in-memory - /// cache. + /// Read the latest read receipt of the given type for the given user, from + /// the in-memory cache. fn get_latest( &self, user_id: &UserId, @@ -69,7 +69,8 @@ impl ReadReceipts { self.users_read_receipts.get(user_id).and_then(|map| map.get(receipt_type)) } - /// Insert or update in the local cache the latest read receipt for the given user. + /// Insert or update in the local cache the latest read receipt for the + /// given user. pub fn upsert_latest( &mut self, user_id: OwnedUserId, @@ -221,8 +222,8 @@ impl ReadReceipts { /// Get the read receipts by user for the given event. /// - /// This includes all the receipts on the event as well as all the receipts on the - /// following events that are filtered out (not visible). + /// This includes all the receipts on the event as well as all the receipts + /// on the following events that are filtered out (not visible). pub(super) fn compute_event_receipts( &self, event_id: &EventId, @@ -552,8 +553,8 @@ impl TimelineInnerMetadata { /// Get the latest receipt of the given type for the given user in the /// timeline. /// - /// This will attempt to read the latest user receipt for a user from the cache, or load it - /// from the storage if missing from the cache. + /// This will attempt to read the latest user receipt for a user from the + /// cache, or load it from the storage if missing from the cache. pub(super) async fn user_receipt( &self, user_id: &UserId,