From 8c676d98c5da79fc340e97601069ab42c421ffed Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sat, 30 Dec 2023 03:26:11 -0500 Subject: [PATCH] Tweaks from cargo update and patches --- common/request/src/response.rs | 4 ++-- patches/mach/Cargo.toml | 2 +- patches/mach/src/lib.rs | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/request/src/response.rs b/common/request/src/response.rs index 04c8472b..46a4239f 100644 --- a/common/request/src/response.rs +++ b/common/request/src/response.rs @@ -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 { - 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()) } } diff --git a/patches/mach/Cargo.toml b/patches/mach/Cargo.toml index 5cd6c89e..bf2da1ff 100644 --- a/patches/mach/Cargo.toml +++ b/patches/mach/Cargo.toml @@ -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" diff --git a/patches/mach/src/lib.rs b/patches/mach/src/lib.rs index 22bb4fc3..e7e1a5a2 100644 --- a/patches/mach/src/lib.rs +++ b/patches/mach/src/lib.rs @@ -1 +1,2 @@ +#[cfg(any(target_os = "macos", target_os = "ios"))] pub use mach2::*;