From afb613c43fd26fa32e7e47ab9498ad1ab675c5f6 Mon Sep 17 00:00:00 2001 From: Xuanwo Date: Wed, 4 Sep 2024 22:48:54 +0800 Subject: [PATCH] Alter name to `wrap` --- src/async_impl/body.rs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/async_impl/body.rs b/src/async_impl/body.rs index 32105edf7..e44fc4faf 100644 --- a/src/async_impl/body.rs +++ b/src/async_impl/body.rs @@ -116,17 +116,6 @@ impl Body { } } - /* - #[cfg(feature = "blocking")] - pub(crate) fn wrap(body: hyper::Body) -> Body { - Body { - inner: Inner::Streaming { - body: Box::pin(WrapHyper(body)), - }, - } - } - */ - pub(crate) fn empty() -> Body { Body::reusable(Bytes::new()) } @@ -147,10 +136,10 @@ impl Body { /// # fn main() { /// let content = "hello,world!".to_string(); /// - /// let body = Body::streaming(content); + /// let body = Body::wrap(content); /// # } /// ``` - pub fn streaming(inner: B) -> Body + pub fn wrap(inner: B) -> Body where B: HttpBody + Send + Sync + 'static, B::Data: Into,