From bf4fe8cd1501056d0c926cb7a7715d1e650f0c7a Mon Sep 17 00:00:00 2001 From: Folke Behrens Date: Mon, 24 Apr 2023 19:20:59 +0200 Subject: [PATCH] Replace crate priority_queue with keyed_priority_queue Fixes #247 --- Cargo.toml | 2 +- src/conn/pool/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 42c9447c..251ef374 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,6 +19,7 @@ flate2 = { version = "1.0", default-features = false } futures-core = "0.3" futures-util = "0.3" futures-sink = "0.3" +keyed_priority_queue = "0.4" lazy_static = "1" lru = "0.10.0" mio = { version = "0.8.0", features = ["os-poll", "net"] } @@ -27,7 +28,6 @@ once_cell = "1.7.2" pem = "2.0.1" percent-encoding = "2.1.0" pin-project = "1.0.2" -priority-queue = "1" serde = "1" serde_json = "1" socket2 = "0.5.2" diff --git a/src/conn/pool/mod.rs b/src/conn/pool/mod.rs index ec6e301b..9fc29e71 100644 --- a/src/conn/pool/mod.rs +++ b/src/conn/pool/mod.rs @@ -7,7 +7,7 @@ // modified, or distributed except according to those terms. use futures_util::FutureExt; -use priority_queue::PriorityQueue; +use keyed_priority_queue::KeyedPriorityQueue; use tokio::sync::mpsc; use std::{ @@ -92,7 +92,7 @@ impl Exchange { #[derive(Default, Debug)] struct Waitlist { - queue: PriorityQueue, + queue: KeyedPriorityQueue, } impl Waitlist {