Skip to content

Commit

Permalink
Replace futures-util with futures-core in non-test code
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte authored and seanmonstar committed Jan 6, 2025
1 parent c66a73a commit 8d390ad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion http-body-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ rust-version = "1.56"

[dependencies]
bytes = "1"
futures-util = { version = "0.3", default-features = false }
futures-core = { version = "0.3", default-features = false }
http = "1"
http-body = { version = "1", path = "../http-body" }
pin-project-lite = "0.2"

[dev-dependencies]
futures-util = { version = "0.3", default-features = false }
tokio = { version = "1", features = ["macros", "rt", "sync", "rt-multi-thread"] }
3 changes: 2 additions & 1 deletion http-body-util/src/combinators/collect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::{
task::{Context, Poll},
};

use futures_core::ready;
use http_body::Body;
use pin_project_lite::pin_project;

Expand All @@ -29,7 +30,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 = 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::{ready, stream::Stream};
use futures_core::{ready, stream::Stream};
use http_body::{Body, Frame};
use pin_project_lite::pin_project;
use std::{
Expand Down

0 comments on commit 8d390ad

Please sign in to comment.