Tweaks from cargo update and patches

This commit is contained in:
Luke Parker 2023-12-30 03:26:11 -05:00
parent 890b70212a
commit 8c676d98c5
No known key found for this signature in database
3 changed files with 4 additions and 3 deletions

View file

@ -1,7 +1,7 @@
use hyper::{
StatusCode,
header::{HeaderValue, HeaderMap},
body::{Buf, Body},
body::{HttpBody, Buf, Body},
};
use crate::{Client, Error};
@ -17,6 +17,6 @@ impl<'a> Response<'a> {
self.0.headers()
}
pub async fn body(self) -> Result<impl std::io::Read, Error> {
hyper::body::aggregate(self.0.into_body()).await.map(Buf::reader).map_err(Error::Hyper)
Ok(self.0.into_body().collect().await.map_err(Error::Hyper)?.aggregate().reader())
}
}

View file

@ -13,5 +13,5 @@ rust-version = "1.56"
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
[dependencies]
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
mach2 = "0.4"

View file

@ -1 +1,2 @@
#[cfg(any(target_os = "macos", target_os = "ios"))]
pub use mach2::*;