doc(sdk): Use the Rust range notation to avoid ambiguity.

pull/1667/head
Ivan Enderlin 2023-03-16 17:03:25 +01:00
parent 5f06dc8229
commit b39a224be8
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -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.

View File

@ -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")??;