From 72d0a0ab8a19a5989aaf55a5f595bbd3cb4361b5 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 13 Apr 2024 08:08:38 +0900 Subject: [PATCH 1/2] Disable unused futures-util feature --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ae124d4..1d3b7d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,7 @@ edition = "2021" base64 = "0.22.0" byteorder = "1.5.0" bytes = "1.5.0" -futures-util = "0.3.30" +futures-util = { version = "0.3.30", default-features = false } http = "0.2.11" http-body = "0.4.6" httparse = "1.8.0" From a6405a4271c43d80b92c38c38a22ac5ab11640ac Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 13 Apr 2024 08:10:27 +0900 Subject: [PATCH 2/2] Use standard library Future and ready --- src/client.rs | 2 +- src/response_body.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/client.rs b/src/client.rs index b0a82e9..4e8491e 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,9 +1,9 @@ use std::{ + future::Future, pin::Pin, task::{Context, Poll}, }; -use futures_util::Future; use http::{Request, Response}; use tonic::body::BoxBody; use tower_service::Service; diff --git a/src/response_body.rs b/src/response_body.rs index 6662572..28d11cb 100644 --- a/src/response_body.rs +++ b/src/response_body.rs @@ -1,13 +1,12 @@ use std::{ ops::{Deref, DerefMut}, pin::Pin, - task::{Context, Poll}, + task::{ready, Context, Poll}, }; use base64::{prelude::BASE64_STANDARD, Engine}; use byteorder::{BigEndian, ByteOrder}; use bytes::{BufMut, Bytes, BytesMut}; -use futures_util::ready; use http::{header::HeaderName, HeaderMap, HeaderValue}; use http_body::Body; use httparse::{Status, EMPTY_HEADER};