diff --git a/src/async_client.rs b/src/async_client.rs index 38c63d20..8128339d 100644 --- a/src/async_client.rs +++ b/src/async_client.rs @@ -23,7 +23,9 @@ use std::time::{Duration, Instant}; use futures::future::Future; use tokio::sync::RwLock; use tokio::time::delay_for as sleep; -use tracing::{debug, info, instrument, trace}; +#[cfg(feature = "encryption")] +use tracing::debug; +use tracing::{info, instrument, trace}; use http::Method as HttpMethod; use http::Response as HttpResponse; @@ -746,14 +748,14 @@ impl AsyncClient { self.base_client.read().await.sync_token.clone() } - #[cfg(feature = "encryption")] - #[cfg_attr(docsrs, doc(cfg(feature = "encryption")))] - #[instrument] /// Query the server for users device keys. /// /// # Panics /// /// Panics if no key query needs to be done. + #[cfg(feature = "encryption")] + #[cfg_attr(docsrs, doc(cfg(feature = "encryption")))] + #[instrument] async fn keys_query(&self) -> Result { let mut users_for_query = self .base_client diff --git a/src/base_client.rs b/src/base_client.rs index 30857109..3b892f7f 100644 --- a/src/base_client.rs +++ b/src/base_client.rs @@ -13,7 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::collections::{HashMap, HashSet}; +use std::collections::HashMap; +#[cfg(feature = "encryption")] +use std::collections::HashSet; use std::fmt; use std::sync::Arc;