From 9dd4014750efb577498ec43bb8e2b9943bd0065d Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Mon, 12 Sep 2022 20:51:50 +0200 Subject: [PATCH] client-api: Export nothing with neither client nor server feature active MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … to work around a build failure in that configuration. This configuration is useful either way. --- crates/ruma-client-api/CHANGELOG.md | 2 ++ crates/ruma-client-api/src/lib.rs | 3 ++- crates/ruma-client-api/tests/uiaa.rs | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/ruma-client-api/CHANGELOG.md b/crates/ruma-client-api/CHANGELOG.md index d3647f16..18401fc2 100644 --- a/crates/ruma-client-api/CHANGELOG.md +++ b/crates/ruma-client-api/CHANGELOG.md @@ -2,6 +2,8 @@ Breaking changes: +* Export nothing from the crate if neither the `client` nor the `server` feature is active + * This may partially be reverted in subsequent releases * `UnreadNotificationsCount` has moved from `sync::sync_events::v3` to `sync::sync_events` * Remove `PartialEq` implementations for a number of types * If the lack of such an `impl` causes problems, please open a GitHub issue diff --git a/crates/ruma-client-api/src/lib.rs b/crates/ruma-client-api/src/lib.rs index dba10c2b..0a35ff0b 100644 --- a/crates/ruma-client-api/src/lib.rs +++ b/crates/ruma-client-api/src/lib.rs @@ -5,8 +5,9 @@ //! //! [client-api]: https://spec.matrix.org/v1.2/client-server-api/ -#![warn(missing_docs)] +#![cfg(any(feature = "client", feature = "server"))] #![cfg_attr(docsrs, feature(doc_auto_cfg))] +#![warn(missing_docs)] pub mod account; pub mod alias; diff --git a/crates/ruma-client-api/tests/uiaa.rs b/crates/ruma-client-api/tests/uiaa.rs index 83f67f97..40aef15c 100644 --- a/crates/ruma-client-api/tests/uiaa.rs +++ b/crates/ruma-client-api/tests/uiaa.rs @@ -1,3 +1,5 @@ +#![cfg(any(feature = "client", feature = "server"))] + use assert_matches::assert_matches; use assign::assign; use ruma_client_api::{