From 147e5f8f033b8a29dec9d4d89c6bca765c6b66b8 Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Thu, 16 Mar 2023 15:35:23 +0100 Subject: [PATCH] fix(sdk): Rename `SlidingSyncList.set_ranges` to `ranges`. This patch renames `SlidingSyncList.set_ranges` to `ranges` so that it matches the same terminology of the `SlidingSyncListBuilder` with `ranges`, `set_range`, `add_range` and `reset_ranges`. Consistency is important here. --- crates/matrix-sdk/src/sliding_sync/list/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/matrix-sdk/src/sliding_sync/list/mod.rs b/crates/matrix-sdk/src/sliding_sync/list/mod.rs index 7b9cb8204..082253550 100644 --- a/crates/matrix-sdk/src/sliding_sync/list/mod.rs +++ b/crates/matrix-sdk/src/sliding_sync/list/mod.rs @@ -149,7 +149,7 @@ impl SlidingSyncList { /// /// Remember to cancel the existing stream and fetch a new one as this will /// only be applied on the next request. - pub fn set_ranges(&self, range: Vec<(u32, u32)>) -> &Self { + pub fn ranges(&self, range: Vec<(u32, u32)>) -> &Self { let value = range.into_iter().map(|(a, b)| (a.into(), b.into())).collect(); Observable::set(&mut self.ranges.write().unwrap(), value);