diff --git a/actix-http/Cargo.toml b/actix-http/Cargo.toml index fa258748c..f58cffcc1 100644 --- a/actix-http/Cargo.toml +++ b/actix-http/Cargo.toml @@ -56,7 +56,7 @@ derive_more = "0.99.5" either = "1.5.3" encoding_rs = "0.8" futures-channel = { version = "0.3.7", default-features = false, features = ["alloc"] } -futures-core = { version = "0.3.7", default-features = false } +futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] } futures-util = { version = "0.3.7", default-features = false, features = ["alloc", "sink"] } ahash = "0.6" h2 = "0.3.0" diff --git a/actix-http/src/lib.rs b/actix-http/src/lib.rs index fa204418d..da97ba61b 100644 --- a/actix-http/src/lib.rs +++ b/actix-http/src/lib.rs @@ -44,7 +44,6 @@ pub use self::builder::HttpServiceBuilder; pub use self::config::{KeepAlive, ServiceConfig}; pub use self::error::{Error, ResponseError, Result}; pub use self::extensions::Extensions; -pub use self::header::HeaderMap; pub use self::httpmessage::HttpMessage; pub use self::message::{Message, RequestHead, RequestHeadType, ResponseHead}; pub use self::payload::{Payload, PayloadStream}; diff --git a/awc/src/client/h1proto.rs b/awc/src/client/h1proto.rs index ff5b8e4cc..afa577786 100644 --- a/awc/src/client/h1proto.rs +++ b/awc/src/client/h1proto.rs @@ -13,8 +13,7 @@ use futures_util::{pin_mut, SinkExt, StreamExt}; use actix_http::body::{BodySize, MessageBody}; use actix_http::error::PayloadError; use actix_http::h1; -use actix_http::http::header::{IntoHeaderValue, HOST}; -use actix_http::HeaderMap; +use actix_http::http::header::{HeaderMap, IntoHeaderValue, HOST}; use actix_http::{Payload, PayloadStream}; use actix_http::{RequestHeadType, ResponseHead}; diff --git a/awc/src/client/h2proto.rs b/awc/src/client/h2proto.rs index 939665b2c..6b9cda7b3 100644 --- a/awc/src/client/h2proto.rs +++ b/awc/src/client/h2proto.rs @@ -10,11 +10,12 @@ use h2::{ client::{Builder, Connection, SendRequest}, SendStream, }; -use http::header::{HeaderValue, CONNECTION, CONTENT_LENGTH, TRANSFER_ENCODING}; use http::{request::Request, Method, Version}; use actix_http::body::{BodySize, MessageBody}; -use actix_http::HeaderMap; +use actix_http::http::header::{ + HeaderMap, HeaderValue, CONNECTION, CONTENT_LENGTH, TRANSFER_ENCODING, +}; use actix_http::Payload; use actix_http::{RequestHeadType, ResponseHead}; diff --git a/awc/src/client/pool.rs b/awc/src/client/pool.rs index 41579a541..fd2d59c00 100644 --- a/awc/src/client/pool.rs +++ b/awc/src/client/pool.rs @@ -12,7 +12,8 @@ use actix_service::Service; use actix_utils::task::LocalWaker; use ahash::AHashMap; use bytes::Bytes; -use futures_util::future::{poll_fn, FutureExt, LocalBoxFuture}; +use futures_core::future::LocalBoxFuture; +use futures_util::future::{poll_fn, FutureExt}; use h2::client::{Connection, SendRequest}; use http::uri::Authority; use indexmap::IndexSet; diff --git a/awc/tests/test_client.rs b/awc/tests/test_client.rs index efcf0f591..f8bbdbe8a 100644 --- a/awc/tests/test_client.rs +++ b/awc/tests/test_client.rs @@ -718,10 +718,9 @@ async fn test_client_cookie_handling() { #[actix_rt::test] async fn client_unread_response() { let addr = test::unused_addr(); + let lst = std::net::TcpListener::bind(addr).unwrap(); std::thread::spawn(move || { - let lst = std::net::TcpListener::bind(addr).unwrap(); - for stream in lst.incoming() { let mut stream = stream.unwrap(); let mut b = [0; 1000];