matrix-sdk: Fix the import for the no-encryption case.

master
Damir Jelić 2020-08-04 11:41:20 +02:00
parent 2bf8c99dfe
commit 28a7831ffd
2 changed files with 5 additions and 3 deletions

View File

@ -49,11 +49,11 @@ use crate::{
}; };
#[cfg(feature = "encryption")] #[cfg(feature = "encryption")]
use crate::identifiers::DeviceId; use crate::{identifiers::DeviceId, sas::Sas};
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
use crate::VERSION; use crate::VERSION;
use crate::{api, http_client::HttpClient, sas::Sas, EventEmitter, Result}; use crate::{api, http_client::HttpClient, EventEmitter, Result};
use matrix_sdk_base::{BaseClient, BaseClientConfig, Room, Session, StateStore}; use matrix_sdk_base::{BaseClient, BaseClientConfig, Room, Session, StateStore};
const DEFAULT_SYNC_TIMEOUT: Duration = Duration::from_secs(30); const DEFAULT_SYNC_TIMEOUT: Duration = Duration::from_secs(30);
@ -1448,10 +1448,10 @@ impl Client {
Ok(response) Ok(response)
} }
/// Get a `Sas` verification object with the given flow id.
#[cfg(feature = "encryption")] #[cfg(feature = "encryption")]
#[cfg_attr(docsrs, doc(cfg(feature = "encryption")))] #[cfg_attr(docsrs, doc(cfg(feature = "encryption")))]
#[instrument] #[instrument]
/// Get a `Sas` verification object with the given flow id.
pub async fn get_verification(&self, flow_id: &str) -> Option<Sas> { pub async fn get_verification(&self, flow_id: &str) -> Option<Sas> {
self.base_client self.base_client
.get_verification(flow_id) .get_verification(flow_id)

View File

@ -53,6 +53,8 @@ mod client;
mod error; mod error;
mod http_client; mod http_client;
mod request_builder; mod request_builder;
#[cfg(feature = "encryption")]
mod sas; mod sas;
pub use client::{Client, ClientConfig, SyncSettings}; pub use client::{Client, ClientConfig, SyncSettings};