Merge branch 'matrix-sdk/fix-no-encryption-build'

master
Damir Jelić 2021-04-12 19:09:32 +02:00
commit a97b01f3ce
3 changed files with 5 additions and 8 deletions

View File

@ -17,7 +17,7 @@ rustdoc-args = ["--cfg", "feature=\"docs\""]
[features] [features]
default = ["encryption", "sled_cryptostore", "sled_state_store", "native-tls"] default = ["encryption", "sled_cryptostore", "sled_state_store", "native-tls"]
encryption = ["matrix-sdk-base/encryption", "dashmap"] encryption = ["matrix-sdk-base/encryption"]
sled_state_store = ["matrix-sdk-base/sled_state_store"] sled_state_store = ["matrix-sdk-base/sled_state_store"]
sled_cryptostore = ["matrix-sdk-base/sled_cryptostore"] sled_cryptostore = ["matrix-sdk-base/sled_cryptostore"]
unstable-synapse-quirks = ["matrix-sdk-base/unstable-synapse-quirks"] unstable-synapse-quirks = ["matrix-sdk-base/unstable-synapse-quirks"]
@ -30,7 +30,7 @@ sso_login = ["warp", "rand", "tokio-stream"]
docs = ["encryption", "sled_cryptostore", "sled_state_store", "sso_login"] docs = ["encryption", "sled_cryptostore", "sled_state_store", "sso_login"]
[dependencies] [dependencies]
dashmap = { version = "4.0.2", optional = true } dashmap = "4.0.2"
futures = "0.3.12" futures = "0.3.12"
http = "0.2.3" http = "0.2.3"
serde_json = "1.0.61" serde_json = "1.0.61"

View File

@ -31,7 +31,6 @@ use std::{
sync::Arc, sync::Arc,
}; };
#[cfg(feature = "encryption")]
use dashmap::DashMap; use dashmap::DashMap;
use futures_timer::Delay as sleep; use futures_timer::Delay as sleep;
use http::HeaderValue; use http::HeaderValue;
@ -116,18 +115,17 @@ use matrix_sdk_common::locks::Mutex;
use crate::{ use crate::{
error::HttpError, error::HttpError,
event_handler::Handler,
http_client::{client_with_config, HttpClient, HttpSend}, http_client::{client_with_config, HttpClient, HttpSend},
room, Error, OutgoingRequest, Result, room, Error, EventHandler, OutgoingRequest, Result,
}; };
#[cfg(feature = "encryption")] #[cfg(feature = "encryption")]
use crate::{ use crate::{
device::{Device, UserDevices}, device::{Device, UserDevices},
event_handler::Handler,
identifiers::DeviceId, identifiers::DeviceId,
sas::Sas, sas::Sas,
verification_request::VerificationRequest, verification_request::VerificationRequest,
EventHandler,
}; };
const DEFAULT_REQUEST_TIMEOUT: Duration = Duration::from_secs(10); const DEFAULT_REQUEST_TIMEOUT: Duration = Duration::from_secs(10);
@ -1525,7 +1523,6 @@ impl Client {
content: impl Into<AnyMessageEventContent>, content: impl Into<AnyMessageEventContent>,
txn_id: Option<Uuid>, txn_id: Option<Uuid>,
) -> Result<send_message_event::Response> { ) -> Result<send_message_event::Response> {
#[cfg(feature = "encryption")]
if let Some(room) = self.get_joined_room(room_id) { if let Some(room) = self.get_joined_room(room_id) {
room.send(content, txn_id).await room.send(content, txn_id).await
} else { } else {

View File

@ -25,7 +25,7 @@ markdown = ["matrix-sdk-common/markdown"]
docs = ["encryption", "sled_cryptostore"] docs = ["encryption", "sled_cryptostore"]
[dependencies] [dependencies]
dashmap= "4.0.2" dashmap = "4.0.2"
serde = { version = "1.0.122", features = ["rc"] } serde = { version = "1.0.122", features = ["rc"] }
serde_json = "1.0.61" serde_json = "1.0.61"
tracing = "0.1.22" tracing = "0.1.22"