From eec76e6797f7531e20d9b212b0a7f580a618ed5b Mon Sep 17 00:00:00 2001 From: Shou Ya Date: Fri, 8 Dec 2023 22:55:56 +0900 Subject: [PATCH] fix the tests --- src/async_impl/decoder.rs | 8 ++++---- src/async_impl/multipart.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/async_impl/decoder.rs b/src/async_impl/decoder.rs index 4ee99c724..d1ba5b7d7 100644 --- a/src/async_impl/decoder.rs +++ b/src/async_impl/decoder.rs @@ -93,7 +93,7 @@ impl Decoder { #[cfg(feature = "blocking")] pub(crate) fn empty() -> Decoder { Decoder { - inner: Inner::PlainText(Body::empty().into_stream()), + inner: Inner::PlainText(Body::empty()), } } @@ -115,7 +115,7 @@ impl Decoder { Decoder { inner: Inner::Pending(Box::pin(Pending( - IoStream(body.into_stream()).peekable(), + IoStream(body).peekable(), DecoderType::Gzip, ))), } @@ -130,7 +130,7 @@ impl Decoder { Decoder { inner: Inner::Pending(Box::pin(Pending( - IoStream(body.into_stream()).peekable(), + IoStream(body).peekable(), DecoderType::Brotli, ))), } @@ -145,7 +145,7 @@ impl Decoder { Decoder { inner: Inner::Pending(Box::pin(Pending( - IoStream(body.into_stream()).peekable(), + IoStream(body).peekable(), DecoderType::Deflate, ))), } diff --git a/src/async_impl/multipart.rs b/src/async_impl/multipart.rs index 6b6a81e3d..ee4cddbc7 100644 --- a/src/async_impl/multipart.rs +++ b/src/async_impl/multipart.rs @@ -155,7 +155,7 @@ impl Form { // then append form data followed by terminating CRLF boundary .chain(header) - .chain(part.value.into_stream()) + .chain(part.value) .chain(stream::once(future::ready(Ok("\r\n".into())))) } @@ -538,7 +538,7 @@ mod tests { .enable_all() .build() .expect("new rt"); - let body = form.stream().into_stream(); + let body = form.stream(); let s = body.map_ok(|try_c| try_c.to_vec()).try_concat(); let out = rt.block_on(s); @@ -588,7 +588,7 @@ mod tests { .enable_all() .build() .expect("new rt"); - let body = form.stream().into_stream(); + let body = form.stream(); let s = body.map(|try_c| try_c.map(|r| r.to_vec())).try_concat(); let out = rt.block_on(s).unwrap(); @@ -620,7 +620,7 @@ mod tests { .enable_all() .build() .expect("new rt"); - let body = form.stream().into_stream(); + let body = form.stream(); let s = body.map(|try_c| try_c.map(|r| r.to_vec())).try_concat(); let out = rt.block_on(s).unwrap();