mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-18 13:40:55 -04:00
chore: Fix PR feedbacks.
This commit is contained in:
@@ -1,7 +1,4 @@
|
||||
use std::{
|
||||
fmt,
|
||||
sync::{Arc, RwLock},
|
||||
};
|
||||
use std::sync::{Arc, RwLock};
|
||||
|
||||
use anyhow::{anyhow, Context};
|
||||
use eyeball::shared::Observable as SharedObservable;
|
||||
@@ -121,12 +118,6 @@ pub struct Client {
|
||||
pub(crate) sliding_sync_reset_broadcast_tx: Arc<SharedObservable<()>>,
|
||||
}
|
||||
|
||||
impl fmt::Debug for Client {
|
||||
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
formatter.debug_struct("Client").field("client", &self.client).finish_non_exhaustive()
|
||||
}
|
||||
}
|
||||
|
||||
impl Client {
|
||||
pub fn new(client: MatrixClient) -> Self {
|
||||
let session_verification_controller: Arc<
|
||||
|
||||
@@ -782,7 +782,7 @@ impl SlidingSync {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, uniffi::Object)]
|
||||
#[derive(Clone, uniffi::Object)]
|
||||
pub struct SlidingSyncBuilder {
|
||||
inner: MatrixSlidingSyncBuilder,
|
||||
client: Client,
|
||||
@@ -804,7 +804,7 @@ impl SlidingSyncBuilder {
|
||||
|
||||
pub fn add_list(self: Arc<Self>, list_builder: Arc<SlidingSyncListBuilder>) -> Arc<Self> {
|
||||
let mut builder = unwrap_or_clone_arc(self);
|
||||
builder.inner = builder.inner.add_list(unwrap_or_clone_arc(list_builder).inner).unwrap();
|
||||
builder.inner = builder.inner.add_list(unwrap_or_clone_arc(list_builder).inner);
|
||||
Arc::new(builder)
|
||||
}
|
||||
|
||||
|
||||
@@ -72,10 +72,9 @@ impl SlidingSyncBuilder {
|
||||
/// Add the given list to the lists.
|
||||
///
|
||||
/// Replace any list with the name.
|
||||
pub fn add_list(mut self, list_builder: SlidingSyncListBuilder) -> Result<Self> {
|
||||
pub fn add_list(mut self, list_builder: SlidingSyncListBuilder) -> Self {
|
||||
self.lists.push(list_builder);
|
||||
|
||||
Ok(self)
|
||||
self
|
||||
}
|
||||
|
||||
/// Activate e2ee, to-device-message and account data extensions if not yet
|
||||
|
||||
Reference in New Issue
Block a user