From 3221f573d2dc6162dcf12f02ee68e4c4cbaf149d Mon Sep 17 00:00:00 2001 From: muvlon Date: Sat, 6 Nov 2021 19:42:25 +0100 Subject: [PATCH] docs(body) fix doctest failing due to missing features The doctest uses `hyper::Client`, but that is not available unless these features are enabled. This commit adds an attribute to check for those and allows `cargo test` with no arguments to pass again. fixes #2687. --- src/body/to_bytes.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/body/to_bytes.rs b/src/body/to_bytes.rs index 198e0c86..c3c48d34 100644 --- a/src/body/to_bytes.rs +++ b/src/body/to_bytes.rs @@ -17,6 +17,7 @@ use super::HttpBody; /// # Example /// /// ``` +/// # #[cfg(all(feature = "client", any(feature = "http1", feature = "http2")))] /// # async fn doc() -> hyper::Result<()> { /// use hyper::{body::HttpBody}; ///