Skip to content

Commit

Permalink
util: replace futures-util with futures-core
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored and seanmonstar committed Feb 1, 2024
1 parent e5b462a commit 70ba87f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion http-body-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
4 changes: 2 additions & 2 deletions http-body-util/src/combinators/collect.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand All @@ -29,7 +29,7 @@ impl<T: Body + ?Sized> Future for Collect<T> {
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?
Expand Down
2 changes: 1 addition & 1 deletion http-body-util/src/combinators/with_trailers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion http-body-util/src/stream.rs
Original file line number Diff line number Diff line change
@@ -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::{
Expand Down

0 comments on commit 70ba87f

Please sign in to comment.