Skip to content

Commit

Permalink
docs(body) fix doctest failing due to missing features
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
whentze authored and seanmonstar committed Nov 8, 2021
1 parent 8062714 commit 3221f57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/body/to_bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
///
Expand Down

0 comments on commit 3221f57

Please sign in to comment.