From b39a224be82efdd3b4b3433ef5554319f93d4855 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Thu, 16 Mar 2023 17:03:25 +0100 Subject: [PATCH] doc(sdk): Use the Rust range notation to avoid ambiguity. --- crates/matrix-sdk/src/sliding_sync/list/mod.rs | 4 ++-- testing/sliding-sync-integration-test/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/matrix-sdk/src/sliding_sync/list/mod.rs b/crates/matrix-sdk/src/sliding_sync/list/mod.rs index ca4594063..5f7079520 100644 --- a/crates/matrix-sdk/src/sliding_sync/list/mod.rs +++ b/crates/matrix-sdk/src/sliding_sync/list/mod.rs @@ -652,11 +652,11 @@ pub enum SlidingSyncState { #[derive(Debug, Default, Clone, PartialEq, Eq, Serialize, Deserialize)] pub enum SlidingSyncMode { /// Fully sync all rooms in the background, page by page of `batch_size`, - /// like `0..19`, `20..39`, 40..59` etc. assuming the `batch_size` is 20. + /// like `0..=19`, `20..=39`, 40..=59` etc. assuming the `batch_size` is 20. #[serde(alias = "FullSync")] PagingFullSync, /// Fully sync all rooms in the background, with a growing window of - /// `batch_size`, like `0..19`, `0..39`, `0..59` etc. assuming the + /// `batch_size`, like `0..=19`, `0..=39`, `0..=59` etc. assuming the /// `batch_size` is 20. GrowingFullSync, /// Only sync the specific defined windows/ranges. diff --git a/testing/sliding-sync-integration-test/src/lib.rs b/testing/sliding-sync-integration-test/src/lib.rs index c7a870bed..d8d10b783 100644 --- a/testing/sliding-sync-integration-test/src/lib.rs +++ b/testing/sliding-sync-integration-test/src/lib.rs @@ -559,7 +559,7 @@ mod tests { pin_mut!(stream); // Exactly one poll! - // Ranges are 0-10 for selective list, and 0-9 for growing list. + // Ranges are 0..=9 for selective list, and 0..=9 for growing list. let room_summary = stream.next().await.context("No room summary found, loop ended unsuccessfully")??; @@ -569,7 +569,7 @@ mod tests { assert_eq!(full_list.state(), SlidingSyncState::PartiallyLoaded, "full isn't preloading"); // Another poll! - // Ranges are 0-10 for selective list, and 0-19 for growing list. + // Ranges are 0..=10 for selective list, and 0..=19 for growing list. let _room_summary = stream.next().await.context("No room summary found, loop ended unsuccessfully")??;