Skip to content

Commit 4debdf3

Browse files
committed
Update re-exports in sqlx-rt
* async_native_tls::Error is the same as native_tls::Error * tokio_native_tls is also used for actix (was in the wrong section)
1 parent 35e2278 commit 4debdf3

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

sqlx-rt/src/lib.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ compile_error!(
1616
"only one of 'runtime-actix', 'runtime-async-std' or 'runtime-tokio' features can be enabled"
1717
);
1818

19-
pub use native_tls;
19+
pub use native_tls::{self, Error as TlsError};
2020

2121
//
2222
// Actix *OR* Tokio
@@ -38,6 +38,9 @@ pub use tokio::{
3838
))]
3939
pub use tokio::net::UnixStream;
4040

41+
#[cfg(all(feature = "tokio-native-tls", not(feature = "async-native-tls")))]
42+
pub use tokio_native_tls::{TlsConnector, TlsStream};
43+
4144
//
4245
// tokio
4346
//
@@ -53,12 +56,6 @@ macro_rules! blocking {
5356
};
5457
}
5558

56-
#[cfg(all(feature = "tokio-native-tls", not(feature = "async-native-tls")))]
57-
pub use tokio_native_tls::{TlsConnector, TlsStream};
58-
59-
#[cfg(all(feature = "tokio-native-tls", not(feature = "async-native-tls")))]
60-
pub use native_tls::Error as TlsError;
61-
6259
//
6360
// actix
6461
//
@@ -113,7 +110,7 @@ macro_rules! blocking {
113110
pub use async_std::os::unix::net::UnixStream;
114111

115112
#[cfg(all(feature = "async-native-tls", not(feature = "tokio-native-tls")))]
116-
pub use async_native_tls::{Error as TlsError, TlsConnector, TlsStream};
113+
pub use async_native_tls::{TlsConnector, TlsStream};
117114

118115
#[cfg(all(
119116
feature = "runtime-async-std",

0 commit comments

Comments
 (0)