Skip to content

Commit

Permalink
Merge pull request #346 from joshtriplett/chain-better
Browse files Browse the repository at this point in the history
Make Body::chain not depend on the async-std feature
  • Loading branch information
joshtriplett authored Mar 5, 2021
2 parents 9a5e0b8 + 00aa4ad commit 6e0cd01
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ impl Body {
/// assert_eq!(&body.into_string().await.unwrap(), "Hello Nori");
/// # Ok(()) }) }
/// ```
#[cfg(feature = "async-std")]
pub fn chain(self, other: Body) -> Self {
let mime = if self.mime == other.mime {
self.mime.clone()
Expand All @@ -518,7 +517,7 @@ impl Body {
Self {
mime,
length,
reader: Box::new(async_std::io::ReadExt::chain(self, other)),
reader: Box::new(futures_lite::io::AsyncReadExt::chain(self, other)),
bytes_read: 0,
}
}
Expand Down

0 comments on commit 6e0cd01

Please sign in to comment.