mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-11 09:23:23 -04:00
chore(ffi): Simplify code and remove one method.
This commit is contained in:
@@ -267,10 +267,6 @@ impl Client {
|
||||
self.inner.sliding_sync_proxy()
|
||||
}
|
||||
|
||||
pub(crate) fn set_sliding_sync_proxy(&self, sliding_sync_proxy: Option<Url>) {
|
||||
self.inner.set_sliding_sync_proxy(sliding_sync_proxy);
|
||||
}
|
||||
|
||||
/// Whether or not the client's homeserver supports the password login flow.
|
||||
pub(crate) async fn supports_password_login(&self) -> anyhow::Result<bool> {
|
||||
let login_types = self.inner.get_login_types().await?;
|
||||
|
||||
@@ -129,16 +129,14 @@ impl ClientBuilder {
|
||||
);
|
||||
}
|
||||
|
||||
RUNTIME.block_on(async move {
|
||||
let sdk_client = inner_builder.build().await?;
|
||||
let sdk_client = RUNTIME.block_on(async move { inner_builder.build().await })?;
|
||||
sdk_client.set_sliding_sync_proxy(
|
||||
builder.sliding_sync_proxy.map(|url| Url::parse(&url)).transpose()?,
|
||||
);
|
||||
|
||||
let client = Client::new(sdk_client);
|
||||
client.set_sliding_sync_proxy(
|
||||
builder.sliding_sync_proxy.map(|url| Url::parse(&url)).transpose()?,
|
||||
);
|
||||
let client = Client::new(sdk_client);
|
||||
|
||||
Ok(Arc::new(client))
|
||||
})
|
||||
Ok(Arc::new(client))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user