Skip to content

Commit 6687923

Browse files
committed
make r2d2 as a feature
1 parent 04d9bb2 commit 6687923

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ modern-full = [
2828
"chrono",
2929
"serde_json",
3030
"url",
31+
"r2d2",
3132
]
3233

3334
[dependencies]
@@ -48,7 +49,7 @@ cast = { version = "0.3", features = ["std"] }
4849
arrow = { version = "6.5.0", default-features = false, features = ["prettyprint"] }
4950
rust_decimal = "1.14"
5051
strum = { version = "0.23", features = ["derive"] }
51-
r2d2 = "0.8.9"
52+
r2d2 = { version = "0.8.9", optional = true }
5253

5354
[dev-dependencies]
5455
doc-comment = "0.3"

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ pub use crate::config::{AccessMode, Config, DefaultNullOrder, DefaultOrder};
7878
pub use crate::error::Error;
7979
pub use crate::ffi::ErrorCode;
8080
pub use crate::params::{params_from_iter, Params, ParamsFromIter};
81+
#[cfg(feature = "r2d2")]
8182
pub use crate::r2d2::DuckdbConnectionManager;
8283
pub use crate::row::{AndThenRows, Map, MappedRows, Row, RowIndex, Rows};
8384
pub use crate::statement::Statement;
@@ -94,6 +95,7 @@ mod config;
9495
mod inner_connection;
9596
mod params;
9697
mod pragma;
98+
#[cfg(feature = "r2d2")]
9799
mod r2d2;
98100
mod raw_statement;
99101
mod row;

0 commit comments

Comments
 (0)