From 1feb77bbef14b287a69e57f272de5ba06dbcd2b3 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 26 Feb 2025 12:17:37 +0100 Subject: [PATCH] doc(event cache): tweak `paginate_backwards_with_network` doc comment --- crates/matrix-sdk/src/event_cache/pagination.rs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/crates/matrix-sdk/src/event_cache/pagination.rs b/crates/matrix-sdk/src/event_cache/pagination.rs index 484d16251..eca1fb66b 100644 --- a/crates/matrix-sdk/src/event_cache/pagination.rs +++ b/crates/matrix-sdk/src/event_cache/pagination.rs @@ -212,10 +212,10 @@ impl RoomPagination { /// Run a single pagination request (/messages) to the server. /// - /// If there's no previous-batch token, it will wait for one for a short - /// while to get one, or if it's already done so or seen a - /// previous-batch token before, it will immediately indicate - /// it's reached the end of the timeline. + /// If there are no previous-batch tokens, it will wait for one for a short + /// while to get one, or if it's already done so or if it's seen a + /// previous-batch token before, it will immediately indicate it's + /// reached the end of the timeline. async fn paginate_backwards_with_network( &self, batch_size: u16, @@ -262,9 +262,11 @@ impl RoomPagination { if gap_id.is_none() { // We got a previous-batch token from the linked chunk *before* running the - // request, which is missing from the linked chunk *after* completing the - // request. It may be a sign the linked chunk has been reset, - // and it's an error in any case. + // request, but it is missing *after* completing the + // request. + // + // It may be a sign the linked chunk has been reset, but it's fine, per this + // function's contract. return Ok(None); }