From 0817bc490ecc63660cc42a427e525834a2da5f7c Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Tue, 21 Sep 2021 13:11:31 +0200 Subject: [PATCH] Add missing required-features for examples --- crates/matrix-sdk-base/Cargo.toml | 4 ++++ crates/matrix-sdk/Cargo.toml | 4 ++++ crates/matrix-sdk/examples/cross_signing_bootstrap.rs | 4 ---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/matrix-sdk-base/Cargo.toml b/crates/matrix-sdk-base/Cargo.toml index 435549d96..5be025581 100644 --- a/crates/matrix-sdk-base/Cargo.toml +++ b/crates/matrix-sdk-base/Cargo.toml @@ -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"] diff --git a/crates/matrix-sdk/Cargo.toml b/crates/matrix-sdk/Cargo.toml index 4a03b138e..8f6247e6c 100644 --- a/crates/matrix-sdk/Cargo.toml +++ b/crates/matrix-sdk/Cargo.toml @@ -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"] diff --git a/crates/matrix-sdk/examples/cross_signing_bootstrap.rs b/crates/matrix-sdk/examples/cross_signing_bootstrap.rs index 1e99ad3f8..9585924b5 100644 --- a/crates/matrix-sdk/examples/cross_signing_bootstrap.rs +++ b/crates/matrix-sdk/examples/cross_signing_bootstrap.rs @@ -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(