1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-01-31 02:52:53 +01:00

remove direct dep on ahash for client pool

This commit is contained in:
Rob Ede 2023-02-26 03:50:36 +00:00
parent 4e05629368
commit fdfb3d45db
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
4 changed files with 5 additions and 7 deletions

View File

@ -61,7 +61,7 @@ actix-codec = "0.5"
actix-utils = "3" actix-utils = "3"
actix-rt = { version = "2.2", default-features = false } actix-rt = { version = "2.2", default-features = false }
ahash = "0.7" ahash = "0.8"
bitflags = "1.2" bitflags = "1.2"
bytes = "1" bytes = "1"
bytestring = "1" bytestring = "1"

View File

@ -72,7 +72,7 @@ actix-http = { version = "3.3", features = ["http2", "ws"] }
actix-router = "0.5" actix-router = "0.5"
actix-web-codegen = { version = "4.2", optional = true } actix-web-codegen = { version = "4.2", optional = true }
ahash = "0.7" ahash = "0.8"
bytes = "1" bytes = "1"
bytestring = "1" bytestring = "1"
cfg-if = "1" cfg-if = "1"

View File

@ -62,7 +62,6 @@ actix-rt = { version = "2.1", default-features = false }
actix-tls = { version = "3", features = ["connect", "uri"] } actix-tls = { version = "3", features = ["connect", "uri"] }
actix-utils = "3" actix-utils = "3"
ahash = "0.7"
base64 = "0.21" base64 = "0.21"
bytes = "1" bytes = "1"
cfg-if = "1" cfg-if = "1"

View File

@ -2,7 +2,7 @@
use std::{ use std::{
cell::RefCell, cell::RefCell,
collections::VecDeque, collections::{HashMap, VecDeque},
future::Future, future::Future,
io, io,
ops::Deref, ops::Deref,
@ -17,7 +17,6 @@ use actix_codec::{AsyncRead, AsyncWrite, ReadBuf};
use actix_http::Protocol; use actix_http::Protocol;
use actix_rt::time::{sleep, Sleep}; use actix_rt::time::{sleep, Sleep};
use actix_service::Service; use actix_service::Service;
use ahash::AHashMap;
use futures_core::future::LocalBoxFuture; use futures_core::future::LocalBoxFuture;
use futures_util::FutureExt as _; use futures_util::FutureExt as _;
use http::uri::Authority; use http::uri::Authority;
@ -62,7 +61,7 @@ where
{ {
fn new(config: ConnectorConfig) -> Self { fn new(config: ConnectorConfig) -> Self {
let permits = Arc::new(Semaphore::new(config.limit)); let permits = Arc::new(Semaphore::new(config.limit));
let available = RefCell::new(AHashMap::default()); let available = RefCell::new(HashMap::default());
Self(Rc::new(ConnectionPoolInnerPriv { Self(Rc::new(ConnectionPoolInnerPriv {
config, config,
@ -124,7 +123,7 @@ where
Io: AsyncWrite + Unpin + 'static, Io: AsyncWrite + Unpin + 'static,
{ {
config: ConnectorConfig, config: ConnectorConfig,
available: RefCell<AHashMap<Key, VecDeque<PooledConnection<Io>>>>, available: RefCell<HashMap<Key, VecDeque<PooledConnection<Io>>>>,
permits: Arc<Semaphore>, permits: Arc<Semaphore>,
} }