From 11c3799fa2abcb01e3d28636127ddde5d67bed76 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Wed, 27 Mar 2024 09:09:40 +0100 Subject: [PATCH] doc(sdk): Improve doc of `EventCache`. --- crates/matrix-sdk/src/event_cache/mod.rs | 4 ++-- crates/matrix-sdk/src/event_cache/store.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/matrix-sdk/src/event_cache/mod.rs b/crates/matrix-sdk/src/event_cache/mod.rs index c18abbbc4..c72a39f1b 100644 --- a/crates/matrix-sdk/src/event_cache/mod.rs +++ b/crates/matrix-sdk/src/event_cache/mod.rs @@ -517,8 +517,8 @@ impl RoomEventCacheInner { Ok(()) } - // Remove existing events, and append a set of events to the room cache and - // storage, notifying observers. + /// Remove existing events, and append a set of events to the room cache and + /// storage, notifying observers. async fn replace_all_events_by( &self, events: Vec, diff --git a/crates/matrix-sdk/src/event_cache/store.rs b/crates/matrix-sdk/src/event_cache/store.rs index 0b22b3f09..80b87fa50 100644 --- a/crates/matrix-sdk/src/event_cache/store.rs +++ b/crates/matrix-sdk/src/event_cache/store.rs @@ -65,7 +65,7 @@ impl RoomEvents { self.push_events(once(event)) } - /// Push events after existing events. + /// Push events after all events or gaps. /// /// The last event in `events` is the most recent one. pub fn push_events(&mut self, events: I) @@ -76,7 +76,7 @@ impl RoomEvents { self.chunks.push_items_back(events) } - /// Push a gap after existing events. + /// Push a gap after all events or gaps. pub fn push_gap(&mut self, gap: Gap) { self.chunks.push_gap_back(gap) }