From 2a97aa9c4edd2381402a6c02b6ae54c36d8779f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Sat, 7 Dec 2024 15:55:32 +0100 Subject: [PATCH] ruma-client: Fix doc tests with default features --- crates/ruma-client/src/lib.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/ruma-client/src/lib.rs b/crates/ruma-client/src/lib.rs index a39f3d58..1910ca07 100644 --- a/crates/ruma-client/src/lib.rs +++ b/crates/ruma-client/src/lib.rs @@ -34,9 +34,9 @@ //! application service that does not need to log in, but uses the access_token directly: //! //! ```no_run -//! # type HttpClient = ruma_client::http_client::Dummy; -//! # +//! # #[cfg(feature = "client-api")] //! # async { +//! # type HttpClient = ruma_client::http_client::Dummy; //! let homeserver_url = "https://example.com".to_owned(); //! let client = ruma_client::Client::builder() //! .homeserver_url(homeserver_url) @@ -59,8 +59,9 @@ //! For example: //! //! ```no_run -//! # let homeserver_url = "https://example.com".to_owned(); +//! # #[cfg(feature = "client-api")] //! # async { +//! # let homeserver_url = "https://example.com".to_owned(); //! # let client = ruma_client::Client::builder() //! # .homeserver_url(homeserver_url) //! # .build::()