docs(body): set doc_cfg attribute for Body::wrap_stream (#2403)

This commit is contained in:
nickelc
2021-01-16 01:24:03 +01:00
committed by GitHub
parent bf8d74ad1c
commit f821ecdd19

View File

@@ -185,6 +185,7 @@ impl Body {
/// This function requires enabling the `stream` feature in your
/// `Cargo.toml`.
#[cfg(feature = "stream")]
#[cfg_attr(docsrs, doc(cfg(feature = "stream")))]
pub fn wrap_stream<S, O, E>(stream: S) -> Body
where
S: Stream<Item = Result<O, E>> + Send + 'static,