diff --git a/http-body-util/Cargo.toml b/http-body-util/Cargo.toml index 4b733e4..7e47f5b 100644 --- a/http-body-util/Cargo.toml +++ b/http-body-util/Cargo.toml @@ -27,10 +27,11 @@ categories = ["web-programming"] [dependencies] bytes = "1" -futures-util = { version = "0.3.14", default-features = false, features = ["alloc"] } +futures-core = "0.3" http = "1" http-body = { version = "1", path = "../http-body" } pin-project-lite = "0.2" [dev-dependencies] tokio = { version = "1", features = ["macros", "rt", "sync", "rt-multi-thread"] } +futures-util = { version = "0.3.14", default-features = false } diff --git a/http-body-util/src/combinators/collect.rs b/http-body-util/src/combinators/collect.rs index 6adfb81..4d35413 100644 --- a/http-body-util/src/combinators/collect.rs +++ b/http-body-util/src/combinators/collect.rs @@ -1,9 +1,9 @@ use std::{ + future::Future, pin::Pin, task::{Context, Poll}, }; -use futures_util::Future; use http_body::Body; use pin_project_lite::pin_project; @@ -29,7 +29,7 @@ impl Future for Collect { let mut me = self.project(); loop { - let frame = futures_util::ready!(me.body.as_mut().poll_frame(cx)); + let frame = futures_core::ready!(me.body.as_mut().poll_frame(cx)); let frame = if let Some(frame) = frame { frame? diff --git a/http-body-util/src/combinators/with_trailers.rs b/http-body-util/src/combinators/with_trailers.rs index 383e1ec..44c4595 100644 --- a/http-body-util/src/combinators/with_trailers.rs +++ b/http-body-util/src/combinators/with_trailers.rs @@ -4,7 +4,7 @@ use std::{ task::{Context, Poll}, }; -use futures_util::ready; +use futures_core::ready; use http::HeaderMap; use http_body::{Body, Frame}; use pin_project_lite::pin_project; diff --git a/http-body-util/src/stream.rs b/http-body-util/src/stream.rs index a6435f2..d872404 100644 --- a/http-body-util/src/stream.rs +++ b/http-body-util/src/stream.rs @@ -1,5 +1,5 @@ use bytes::Buf; -use futures_util::stream::Stream; +use futures_core::Stream; use http_body::{Body, Frame}; use pin_project_lite::pin_project; use std::{