mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-29 03:23:50 -04:00
chore(sdk): Remove useless imports or fix unused code.
This commit is contained in:
committed by
Benjamin Bouvier
parent
6593e32582
commit
b5bda577dd
@@ -17,7 +17,6 @@ use std::{
|
||||
ops::DerefMut,
|
||||
};
|
||||
|
||||
use bs58;
|
||||
use ruma::api::client::backup::EncryptedSessionData;
|
||||
use thiserror::Error;
|
||||
use vodozemac::Curve25519PublicKey;
|
||||
|
||||
@@ -862,13 +862,13 @@ pub(crate) mod tests {
|
||||
|
||||
// When building a client with the server's URL.
|
||||
builder = builder.server_name_or_homeserver_url(homeserver.uri());
|
||||
let client = builder.build().await.unwrap();
|
||||
let _client = builder.build().await.unwrap();
|
||||
|
||||
// Then a client should be built without support for sliding sync or OIDC.
|
||||
#[cfg(feature = "experimental-sliding-sync")]
|
||||
assert!(client.sliding_sync_proxy().is_none());
|
||||
assert!(_client.sliding_sync_proxy().is_none());
|
||||
#[cfg(feature = "experimental-oidc")]
|
||||
assert!(client.oidc().authentication_server_info().is_none());
|
||||
assert!(_client.oidc().authentication_server_info().is_none());
|
||||
}
|
||||
|
||||
#[async_test]
|
||||
@@ -884,13 +884,13 @@ pub(crate) mod tests {
|
||||
|
||||
// When building a client with the server's URL.
|
||||
builder = builder.server_name_or_homeserver_url(homeserver.uri());
|
||||
let client = builder.build().await.unwrap();
|
||||
let _client = builder.build().await.unwrap();
|
||||
|
||||
// Then a client should be built with support for sliding sync.
|
||||
#[cfg(feature = "experimental-sliding-sync")]
|
||||
assert_eq!(client.sliding_sync_proxy(), Some("https://localhost:1234".parse().unwrap()));
|
||||
assert_eq!(_client.sliding_sync_proxy(), Some("https://localhost:1234".parse().unwrap()));
|
||||
#[cfg(feature = "experimental-oidc")]
|
||||
assert!(client.oidc().authentication_server_info().is_none());
|
||||
assert!(_client.oidc().authentication_server_info().is_none());
|
||||
}
|
||||
|
||||
#[async_test]
|
||||
@@ -939,13 +939,13 @@ pub(crate) mod tests {
|
||||
|
||||
// When building a client with the base server.
|
||||
builder = builder.server_name_or_homeserver_url(server.uri());
|
||||
let client = builder.build().await.unwrap();
|
||||
let _client = builder.build().await.unwrap();
|
||||
|
||||
// Then a client should be built without support for sliding sync or OIDC.
|
||||
#[cfg(feature = "experimental-sliding-sync")]
|
||||
assert!(client.sliding_sync_proxy().is_none());
|
||||
assert!(_client.sliding_sync_proxy().is_none());
|
||||
#[cfg(feature = "experimental-oidc")]
|
||||
assert!(client.oidc().authentication_server_info().is_none());
|
||||
assert!(_client.oidc().authentication_server_info().is_none());
|
||||
}
|
||||
|
||||
#[async_test]
|
||||
@@ -968,13 +968,13 @@ pub(crate) mod tests {
|
||||
|
||||
// When building a client with the base server.
|
||||
builder = builder.server_name_or_homeserver_url(server.uri());
|
||||
let client = builder.build().await.unwrap();
|
||||
let _client = builder.build().await.unwrap();
|
||||
|
||||
// Then a client should be built with support for sliding sync.
|
||||
#[cfg(feature = "experimental-sliding-sync")]
|
||||
assert_eq!(client.sliding_sync_proxy(), Some("https://localhost:1234".parse().unwrap()));
|
||||
assert_eq!(_client.sliding_sync_proxy(), Some("https://localhost:1234".parse().unwrap()));
|
||||
#[cfg(feature = "experimental-oidc")]
|
||||
assert!(client.oidc().authentication_server_info().is_none());
|
||||
assert!(_client.oidc().authentication_server_info().is_none());
|
||||
}
|
||||
|
||||
#[async_test]
|
||||
@@ -1030,14 +1030,14 @@ pub(crate) mod tests {
|
||||
|
||||
// When building a client with the base server.
|
||||
builder = builder.server_name_or_homeserver_url(server.uri());
|
||||
let client = builder.build().await.unwrap();
|
||||
let _client = builder.build().await.unwrap();
|
||||
|
||||
// Then a client should be built with support for both sliding sync and OIDC.
|
||||
#[cfg(feature = "experimental-sliding-sync")]
|
||||
assert_eq!(client.sliding_sync_proxy(), Some("https://localhost:1234".parse().unwrap()));
|
||||
assert_eq!(_client.sliding_sync_proxy(), Some("https://localhost:1234".parse().unwrap()));
|
||||
#[cfg(feature = "experimental-oidc")]
|
||||
assert_eq!(
|
||||
client.oidc().authentication_server_info().unwrap().issuer,
|
||||
_client.oidc().authentication_server_info().unwrap().issuer,
|
||||
"https://localhost:5678".to_owned()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -25,8 +25,6 @@ use eyeball::SharedObservable;
|
||||
use futures_util::future::try_join;
|
||||
pub use matrix_sdk_base::media::*;
|
||||
use mime::Mime;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use mime2ext;
|
||||
use ruma::{
|
||||
api::client::media::{create_content, get_content, get_content_thumbnail},
|
||||
assign,
|
||||
|
||||
@@ -199,11 +199,7 @@ pub fn power_level_user_changes(
|
||||
mod tests {
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use ruma::{
|
||||
events::room::power_levels::{RoomPowerLevels, RoomPowerLevelsEventContent},
|
||||
int,
|
||||
power_levels::NotificationPowerLevels,
|
||||
};
|
||||
use ruma::{int, power_levels::NotificationPowerLevels};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user