From ce4d53a88c850f4a079c6c0fa25d7ffadea888e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Thu, 26 Nov 2020 14:27:11 +0100 Subject: [PATCH] examples: Feature gate the cross signing bootstrap example. --- matrix_sdk/examples/cross_signing_bootstrap.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/matrix_sdk/examples/cross_signing_bootstrap.rs b/matrix_sdk/examples/cross_signing_bootstrap.rs index b6a4e69f..5f910bf4 100644 --- a/matrix_sdk/examples/cross_signing_bootstrap.rs +++ b/matrix_sdk/examples/cross_signing_bootstrap.rs @@ -42,6 +42,7 @@ async fn bootstrap(client: Client, user_id: UserId, password: String) { .read_line(&mut input) .expect("error: unable to read user input"); + #[cfg(feature = "encryption")] if let Err(e) = client.bootstrap_cross_signing(None).await { if let Some(response) = e.uiaa_response() { let auth_data = auth_data(&user_id, &password, response.session.as_deref()); @@ -53,6 +54,9 @@ async fn bootstrap(client: Client, user_id: UserId, password: String) { panic!("Error durign cross signing bootstrap {:#?}", e); } } + + #[cfg(not(feature = "encryption"))] + panic!("Cross signing requires the encryption feature to be enabled"); } async fn login(