Skip to content

Commit fc84a61

Browse files
committed
Fix feature flags in re-exports
1 parent 26bc333 commit fc84a61

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

src/pool.rs

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,30 @@
8181
8282
// re-exports
8383
// sync
84-
#[cfg(any(feature = "sync", feature = "pool"))]
85-
pub use self::sync_impls::{Pool, TlsPool};
86-
#[cfg(any(feature = "sync", feature = "pool"))]
87-
/// [`r2d2`](https://docs.rs/r2d2)'s error type
88-
pub use r2d2::Error as r2d2Error;
84+
cfg_sync! {
85+
#[cfg(feature = "pool")]
86+
/// [`r2d2`](https://docs.rs/r2d2)'s error type// async
87+
pub use r2d2::Error as r2d2Error;
88+
#[cfg(feature = "pool")]
89+
pub use self::sync_impls::Pool;
90+
cfg_sync_ssl_any! {
91+
#[cfg(feature = "pool")]
92+
pub use self::sync_impls::TlsPool;
93+
}
94+
}
8995
// async
90-
#[cfg(any(feature = "aio", feature = "aio-pool"))]
91-
pub use self::async_impls::{Pool as AsyncPool, TlsPool as AsyncTlsPool};
92-
#[cfg(any(feature = "aio", feature = "aio-pool"))]
93-
/// [`bb8`](https://docs.rs/bb8)'s error type
94-
pub use bb8::RunError as bb8Error;
96+
cfg_async! {
97+
#[cfg(feature = "aio-pool")]
98+
/// [`bb8`](https://docs.rs/bb8)'s error type
99+
pub use bb8::RunError as bb8Error;
100+
#[cfg(feature = "aio-pool")]
101+
pub use self::async_impls::Pool as AsyncPool;
102+
cfg_async_ssl_any! {
103+
#[cfg(feature = "aio-pool")]
104+
pub use self::async_impls::TlsPool as AsyncTlsPool;
105+
}
106+
}
95107

96-
// imports
97108
use core::marker::PhantomData;
98109

99110
#[derive(Debug, Clone)]

0 commit comments

Comments
 (0)