mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-06 15:04:11 -04:00
feat(sdk): Remove SlidingSync::pop_list.
This method is used by nobody. It's safe to remove it.
This commit is contained in:
@@ -756,10 +756,6 @@ impl SlidingSync {
|
||||
self.inner.add_list(list.inner.clone()).map(|inner| Arc::new(SlidingSyncList { inner }))
|
||||
}
|
||||
|
||||
pub fn pop_list(&self, name: String) -> Option<Arc<SlidingSyncList>> {
|
||||
self.inner.pop_list(&name).map(|inner| Arc::new(SlidingSyncList { inner }))
|
||||
}
|
||||
|
||||
pub fn add_common_extensions(&self) {
|
||||
self.inner.add_common_extensions();
|
||||
}
|
||||
|
||||
@@ -196,16 +196,6 @@ impl SlidingSync {
|
||||
self.inner.lists.read().unwrap().get(list_name).cloned()
|
||||
}
|
||||
|
||||
/// Remove the SlidingSyncList named `list_name` from the lists list if
|
||||
/// found.
|
||||
///
|
||||
/// Note: Remember that this change will only be applicable for any new
|
||||
/// stream created after this. The old stream will still continue to use the
|
||||
/// previous set of lists.
|
||||
pub fn pop_list(&self, list_name: &String) -> Option<SlidingSyncList> {
|
||||
self.inner.lists.write().unwrap().remove(list_name)
|
||||
}
|
||||
|
||||
/// Add the list to the list of lists.
|
||||
///
|
||||
/// As lists need to have a unique `.name`, if a list with the same name
|
||||
|
||||
@@ -448,9 +448,9 @@ async fn live_lists() -> anyhow::Result<()> {
|
||||
// we only heard about the ones we had asked for
|
||||
assert_eq!(summary.lists, [list_name_1, list_name_2, list_name_3]);
|
||||
|
||||
let Some(list_2) = sync_proxy.pop_list(&list_name_2.to_owned()) else {
|
||||
bail!("Room exists");
|
||||
};
|
||||
let Some(list_2) = sync_proxy.get_list(&list_name_2.to_owned()) else {
|
||||
bail!("Room exists");
|
||||
};
|
||||
|
||||
// we need to restart the stream after every list listing update
|
||||
let stream = sync_proxy.stream();
|
||||
|
||||
Reference in New Issue
Block a user