Skip to content

Commit 6e0cd01

Browse files
authored
Merge pull request http-rs#346 from joshtriplett/chain-better
Make Body::chain not depend on the async-std feature
2 parents 9a5e0b8 + 00aa4ad commit 6e0cd01

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/body.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,6 @@ impl Body {
504504
/// assert_eq!(&body.into_string().await.unwrap(), "Hello Nori");
505505
/// # Ok(()) }) }
506506
/// ```
507-
#[cfg(feature = "async-std")]
508507
pub fn chain(self, other: Body) -> Self {
509508
let mime = if self.mime == other.mime {
510509
self.mime.clone()
@@ -518,7 +517,7 @@ impl Body {
518517
Self {
519518
mime,
520519
length,
521-
reader: Box::new(async_std::io::ReadExt::chain(self, other)),
520+
reader: Box::new(futures_lite::io::AsyncReadExt::chain(self, other)),
522521
bytes_read: 0,
523522
}
524523
}

0 commit comments

Comments
 (0)