Add missing required-features for examples

This commit is contained in:
Jonas Platte
2021-09-21 13:11:31 +02:00
parent 3621b62418
commit 0817bc490e
3 changed files with 8 additions and 4 deletions

View File

@@ -64,3 +64,7 @@ tempfile = "3.2.0"
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3.24"
[[example]]
name = "state_inspector"
required-features = ["sled_state_store"]

View File

@@ -107,6 +107,10 @@ tempfile = "3.2.0"
tokio = { version = "1.7.1", default-features = false, features = ["rt-multi-thread", "macros"] }
tracing-subscriber = "0.2.18"
[[example]]
name = "cross_signing_bootstrap"
required-features = ["encryption"]
[[example]]
name = "emoji_verification"
required-features = ["encryption"]

View File

@@ -14,7 +14,6 @@ async fn bootstrap(client: Client, user_id: UserId, password: String) {
io::stdin().read_line(&mut input).expect("error: unable to read user input");
#[cfg(feature = "encryption")]
if let Err(e) = client.bootstrap_cross_signing(None).await {
use matrix_sdk::ruma::{api::client::r0::uiaa, assign};
@@ -32,9 +31,6 @@ async fn bootstrap(client: Client, user_id: UserId, password: String) {
panic!("Error during cross-signing bootstrap {:#?}", e);
}
}
#[cfg(not(feature = "encryption"))]
panic!("Cross signing requires the encryption feature to be enabled");
}
async fn login(