Skip to content

Commit

Permalink
fix the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shouya committed Dec 8, 2023
1 parent 508f0e9 commit eec76e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/async_impl/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
}
}

Expand All @@ -115,7 +115,7 @@ impl Decoder {

Decoder {
inner: Inner::Pending(Box::pin(Pending(
IoStream(body.into_stream()).peekable(),
IoStream(body).peekable(),
DecoderType::Gzip,
))),
}
Expand All @@ -130,7 +130,7 @@ impl Decoder {

Decoder {
inner: Inner::Pending(Box::pin(Pending(
IoStream(body.into_stream()).peekable(),
IoStream(body).peekable(),
DecoderType::Brotli,
))),
}
Expand All @@ -145,7 +145,7 @@ impl Decoder {

Decoder {
inner: Inner::Pending(Box::pin(Pending(
IoStream(body.into_stream()).peekable(),
IoStream(body).peekable(),
DecoderType::Deflate,
))),
}
Expand Down
8 changes: 4 additions & 4 deletions src/async_impl/multipart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()))))
}

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit eec76e6

Please sign in to comment.