Repository: blackbeam/mysql_async (language: rust)

Issue:
Alternative to priority_queue dependency
dc78d2ddb5b37bdc0ace5d886678fefdffa349fc added a new dependency on the [priority-queue crate](https://docs.rs/priority-queue/1.3.1/priority_queue/), which is LGPL licensed - unfortunately, since Rust statically links all libraries and we distribute binaries to customers, this currently likely prevents us using mysql_async past that commit. Is there a world where you'd consider an alternative to that dependency, either permanently or via a feature flag, to allow non-copyleft-compliant use of mysql-async?


Discussion / hints:
Oh, thanks for pointing it out!
@cloneable, could you please come up with a replacement?

Fix patch:
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<QueuedWaker, QueueId>,
+    queue: KeyedPriorityQueue<QueuedWaker, QueueId>,
 }
 
 impl Waitlist {


Test patch: