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.
This commit is contained in:
@@ -17,6 +17,7 @@ use super::HttpBody;
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
/// # #[cfg(all(feature = "client", any(feature = "http1", feature = "http2")))]
|
||||||
/// # async fn doc() -> hyper::Result<()> {
|
/// # async fn doc() -> hyper::Result<()> {
|
||||||
/// use hyper::{body::HttpBody};
|
/// use hyper::{body::HttpBody};
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user