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.
This commit is contained in:
Ivan Enderlin
2023-03-16 15:35:23 +01:00
parent 8e9cabcbf9
commit 147e5f8f03

View File

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