From 9339c543235ca09664e388284811746020350b4b Mon Sep 17 00:00:00 2001 From: kraktus <56031107+kraktus@users.noreply.github.com> Date: Thu, 3 Feb 2022 00:09:25 +0100 Subject: [PATCH] Doc: `stream` feature is needed for `wrap_stream` and `From` for `Body` (#1456) At least `wrap_stream` it is written in plain text, but adding the visual flag should be better and coherent with `byte_stream` documentation, but nothing is shown for `From` for `Body`. Co-authored-by: kraktus --- src/async_impl/body.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/async_impl/body.rs b/src/async_impl/body.rs index afcce71..c9c506f 100644 --- a/src/async_impl/body.rs +++ b/src/async_impl/body.rs @@ -79,6 +79,7 @@ impl Body { /// /// This requires the `stream` feature to be enabled. #[cfg(feature = "stream")] + #[cfg_attr(docsrs, doc(cfg(feature = "stream")))] pub fn wrap_stream(stream: S) -> Body where S: futures_core::stream::TryStream + Send + Sync + 'static, @@ -213,6 +214,7 @@ impl From<&'static str> for Body { } #[cfg(feature = "stream")] +#[cfg_attr(docsrs, doc(cfg(feature = "stream")))] impl From for Body { #[inline] fn from(file: File) -> Body {