Skip to content

Commit

Permalink
Doc: stream feature is needed for wrap_stream and From<File> fo…
Browse files Browse the repository at this point in the history
…r `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<File>` for `Body`.

Co-authored-by: kraktus <kraktus@users.noreply.github.com>
  • Loading branch information
kraktus and kraktus committed Feb 2, 2022
1 parent d92d2aa commit 9339c54
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/async_impl/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<S>(stream: S) -> Body
where
S: futures_core::stream::TryStream + Send + Sync + 'static,
Expand Down Expand Up @@ -213,6 +214,7 @@ impl From<&'static str> for Body {
}

#[cfg(feature = "stream")]
#[cfg_attr(docsrs, doc(cfg(feature = "stream")))]
impl From<File> for Body {
#[inline]
fn from(file: File) -> Body {
Expand Down

0 comments on commit 9339c54

Please sign in to comment.