Skip to content

Commit 3221f57

Browse files
whentzeseanmonstar
authored andcommitted
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 hyperium#2687.
1 parent 8062714 commit 3221f57

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/body/to_bytes.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use super::HttpBody;
1717
/// # Example
1818
///
1919
/// ```
20+
/// # #[cfg(all(feature = "client", any(feature = "http1", feature = "http2")))]
2021
/// # async fn doc() -> hyper::Result<()> {
2122
/// use hyper::{body::HttpBody};
2223
///

0 commit comments

Comments
 (0)