Skip to content

Commit 70ba87f

Browse files
tottotoseanmonstar
authored andcommitted
util: replace futures-util with futures-core
1 parent e5b462a commit 70ba87f

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

http-body-util/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ categories = ["web-programming"]
2727

2828
[dependencies]
2929
bytes = "1"
30-
futures-util = { version = "0.3.14", default-features = false, features = ["alloc"] }
30+
futures-core = "0.3"
3131
http = "1"
3232
http-body = { version = "1", path = "../http-body" }
3333
pin-project-lite = "0.2"
3434

3535
[dev-dependencies]
3636
tokio = { version = "1", features = ["macros", "rt", "sync", "rt-multi-thread"] }
37+
futures-util = { version = "0.3.14", default-features = false }

http-body-util/src/combinators/collect.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
use std::{
2+
future::Future,
23
pin::Pin,
34
task::{Context, Poll},
45
};
56

6-
use futures_util::Future;
77
use http_body::Body;
88
use pin_project_lite::pin_project;
99

@@ -29,7 +29,7 @@ impl<T: Body + ?Sized> Future for Collect<T> {
2929
let mut me = self.project();
3030

3131
loop {
32-
let frame = futures_util::ready!(me.body.as_mut().poll_frame(cx));
32+
let frame = futures_core::ready!(me.body.as_mut().poll_frame(cx));
3333

3434
let frame = if let Some(frame) = frame {
3535
frame?

http-body-util/src/combinators/with_trailers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use std::{
44
task::{Context, Poll},
55
};
66

7-
use futures_util::ready;
7+
use futures_core::ready;
88
use http::HeaderMap;
99
use http_body::{Body, Frame};
1010
use pin_project_lite::pin_project;

http-body-util/src/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use bytes::Buf;
2-
use futures_util::stream::Stream;
2+
use futures_core::Stream;
33
use http_body::{Body, Frame};
44
use pin_project_lite::pin_project;
55
use std::{

0 commit comments

Comments
 (0)