diff --git a/Cargo.lock b/Cargo.lock index 11ddea1..f1420b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -727,6 +727,24 @@ dependencies = [ "tokio", ] +[[package]] +name = "deadpool" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51dc1e92ba8164da131a4753a26cb1e7ebcfe617e56bb3c2b6136049c8ee5730" +dependencies = [ + "async-trait", + "deadpool-runtime", + "num_cpus", + "tokio", +] + +[[package]] +name = "deadpool-runtime" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaa37046cc0f6c3cc6090fbdbf73ef0b8ef4cfcc37f6befc0020f63e8cf121e1" + [[package]] name = "diff" version = "0.1.12" @@ -1601,7 +1619,7 @@ version = "0.8.0" dependencies = [ "cached", "check-if-email-exists", - "deadpool", + "deadpool 0.9.1", "doc-comment", "fast_chemail", "glob", @@ -3518,7 +3536,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33807c11bd2c5a3896c36042ef2ca9663795bb7e4af2fe87474a159ea72c2159" dependencies = [ "async-trait", - "deadpool", + "deadpool 0.7.0", "futures", "futures-timer", "http-types", diff --git a/lychee-lib/Cargo.toml b/lychee-lib/Cargo.toml index 6f2bd00..d509e9c 100644 --- a/lychee-lib/Cargo.toml +++ b/lychee-lib/Cargo.toml @@ -18,7 +18,7 @@ version = "0.8.0" [dependencies] check-if-email-exists = "0.8.25" -deadpool = "0.7.0" +deadpool = "0.9.1" fast_chemail = "0.9.6" glob = "0.3.0" html5ever = "0.25.1" diff --git a/lychee-lib/src/client_pool.rs b/lychee-lib/src/client_pool.rs index a2c8a31..85f3ef0 100644 --- a/lychee-lib/src/client_pool.rs +++ b/lychee-lib/src/client_pool.rs @@ -34,7 +34,7 @@ impl ClientPool { /// asynchronously to a client from the pool pub async fn listen(&mut self) { while let Some(req) = self.rx.recv().await { - let client = self.pool.get().await; + let client = self.pool.get().await.unwrap(); let tx = self.tx.clone(); tokio::spawn(async move { // Client::check() may fail only because Request::try_from() may fail