From 28a7831ffd20622426e2be220c4add6ecc065acb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 4 Aug 2020 11:41:20 +0200 Subject: [PATCH] matrix-sdk: Fix the import for the no-encryption case. --- matrix_sdk/src/client.rs | 6 +++--- matrix_sdk/src/lib.rs | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index 4c982ea5..b040ae4c 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -49,11 +49,11 @@ use crate::{ }; #[cfg(feature = "encryption")] -use crate::identifiers::DeviceId; +use crate::{identifiers::DeviceId, sas::Sas}; #[cfg(not(target_arch = "wasm32"))] 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}; const DEFAULT_SYNC_TIMEOUT: Duration = Duration::from_secs(30); @@ -1448,10 +1448,10 @@ impl Client { Ok(response) } + /// Get a `Sas` verification object with the given flow id. #[cfg(feature = "encryption")] #[cfg_attr(docsrs, doc(cfg(feature = "encryption")))] #[instrument] - /// Get a `Sas` verification object with the given flow id. pub async fn get_verification(&self, flow_id: &str) -> Option { self.base_client .get_verification(flow_id) diff --git a/matrix_sdk/src/lib.rs b/matrix_sdk/src/lib.rs index f92ee856..9d83fac1 100644 --- a/matrix_sdk/src/lib.rs +++ b/matrix_sdk/src/lib.rs @@ -53,6 +53,8 @@ mod client; mod error; mod http_client; mod request_builder; + +#[cfg(feature = "encryption")] mod sas; pub use client::{Client, ClientConfig, SyncSettings};