enable r2d2 feature in diesel

This commit is contained in:
Akulij 2025-04-03 02:28:01 +09:00
parent 8692e88d2c
commit 834cbb2962
2 changed files with 22 additions and 1 deletions

21
Cargo.lock generated
View File

@ -263,6 +263,7 @@ dependencies = [
"diesel_derives", "diesel_derives",
"itoa", "itoa",
"pq-sys", "pq-sys",
"r2d2",
] ]
[[package]] [[package]]
@ -1304,6 +1305,17 @@ version = "5.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5"
[[package]]
name = "r2d2"
version = "0.8.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93"
dependencies = [
"log",
"parking_lot",
"scheduled-thread-pool",
]
[[package]] [[package]]
name = "rand" name = "rand"
version = "0.9.0" version = "0.9.0"
@ -1459,6 +1471,15 @@ dependencies = [
"windows-sys 0.59.0", "windows-sys 0.59.0",
] ]
[[package]]
name = "scheduled-thread-pool"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19"
dependencies = [
"parking_lot",
]
[[package]] [[package]]
name = "scoped-futures" name = "scoped-futures"
version = "0.1.4" version = "0.1.4"

View File

@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
diesel = { version = "2.2.8", features = ["postgres"] } diesel = { version = "2.2.8", features = ["postgres", "r2d2"] }
diesel-async = { version = "0.5.2", features = ["postgres"] } diesel-async = { version = "0.5.2", features = ["postgres"] }
dotenvy = "0.15.7" dotenvy = "0.15.7"
envconfig = "0.11.0" envconfig = "0.11.0"