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) }