Skip to content

Commit

Permalink
Update re-exports in sqlx-rt
Browse files Browse the repository at this point in the history
* async_native_tls::Error is the same as native_tls::Error
* tokio_native_tls is also used for actix (was in the wrong section)
  • Loading branch information
jplatte committed Oct 14, 2020
1 parent 35e2278 commit 4debdf3
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions sqlx-rt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ compile_error!(
"only one of 'runtime-actix', 'runtime-async-std' or 'runtime-tokio' features can be enabled"
);

pub use native_tls;
pub use native_tls::{self, Error as TlsError};

//
// Actix *OR* Tokio
Expand All @@ -38,6 +38,9 @@ pub use tokio::{
))]
pub use tokio::net::UnixStream;

#[cfg(all(feature = "tokio-native-tls", not(feature = "async-native-tls")))]
pub use tokio_native_tls::{TlsConnector, TlsStream};

//
// tokio
//
Expand All @@ -53,12 +56,6 @@ macro_rules! blocking {
};
}

#[cfg(all(feature = "tokio-native-tls", not(feature = "async-native-tls")))]
pub use tokio_native_tls::{TlsConnector, TlsStream};

#[cfg(all(feature = "tokio-native-tls", not(feature = "async-native-tls")))]
pub use native_tls::Error as TlsError;

//
// actix
//
Expand Down Expand Up @@ -113,7 +110,7 @@ macro_rules! blocking {
pub use async_std::os::unix::net::UnixStream;

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

#[cfg(all(
feature = "runtime-async-std",
Expand Down

0 comments on commit 4debdf3

Please sign in to comment.