Skip to content

Commit c8ee4a3

Browse files
authored
Merge pull request #188 from fakeshadow/pool
[features] add `pool` crate feature
2 parents e73c2d9 + 8474e4f commit c8ee4a3

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ for Rust libraries in [RFC #1105](https://github.com/rust-lang/rfcs/blob/master/
66

77
## [Unreleased]
88

9+
* Add crate feature `pool` for extending connection pool implements through external crate
10+
911
## [0.5.0] - 2024-07-19
1012

1113
* Added type `diesel_async::pooled_connection::mobc::PooledConnection`

Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ postgres = ["diesel/postgres_backend", "tokio-postgres", "tokio", "tokio/rt"]
6060
sqlite = ["diesel/sqlite", "sync-connection-wrapper"]
6161
sync-connection-wrapper = ["tokio/rt"]
6262
async-connection-wrapper = ["tokio/net"]
63-
r2d2 = ["diesel/r2d2"]
64-
bb8 = ["dep:bb8"]
65-
mobc = ["dep:mobc"]
66-
deadpool = ["dep:deadpool"]
63+
pool = []
64+
r2d2 = ["pool", "diesel/r2d2"]
65+
bb8 = ["pool", "dep:bb8"]
66+
mobc = ["pool", "dep:mobc"]
67+
deadpool = ["pool", "dep:deadpool"]
6768

6869
[[test]]
6970
name = "integration_tests"

src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,7 @@ pub mod async_connection_wrapper;
8686
mod mysql;
8787
#[cfg(feature = "postgres")]
8888
pub mod pg;
89-
#[cfg(any(
90-
feature = "deadpool",
91-
feature = "bb8",
92-
feature = "mobc",
93-
feature = "r2d2"
94-
))]
89+
#[cfg(feature = "pool")]
9590
pub mod pooled_connection;
9691
mod run_query_dsl;
9792
#[cfg(any(feature = "postgres", feature = "mysql"))]

src/pooled_connection/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ where
119119
/// * [deadpool](self::deadpool)
120120
/// * [bb8](self::bb8)
121121
/// * [mobc](self::mobc)
122+
#[allow(dead_code)]
122123
pub struct AsyncDieselConnectionManager<C> {
123124
connection_url: String,
124125
manager_config: ManagerConfig<C>,

0 commit comments

Comments
 (0)