Skip to content

Commit 96609d4

Browse files
jplatteabonander
authored andcommitted
Update cfg attributes in sqlx-rt
* Move negated runtime feature checks to the end for consistency * Remove redundant cfg attribute
1 parent 4a09cba commit 96609d4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

sqlx-rt/src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ pub use native_tls::{self, Error as TlsError};
2323
//
2424

2525
#[cfg(all(
26-
not(feature = "runtime-async-std"),
2726
any(feature = "runtime-tokio", feature = "runtime-actix"),
27+
not(feature = "runtime-async-std"),
2828
))]
2929
pub use tokio::{
3030
self, fs, io::AsyncRead, io::AsyncReadExt, io::AsyncWrite, io::AsyncWriteExt, net::TcpStream,
@@ -33,8 +33,8 @@ pub use tokio::{
3333

3434
#[cfg(all(
3535
unix,
36-
not(feature = "runtime-async-std"),
3736
any(feature = "runtime-tokio", feature = "runtime-actix"),
37+
not(feature = "runtime-async-std"),
3838
))]
3939
pub use tokio::net::UnixStream;
4040

@@ -152,7 +152,6 @@ mod tokio_runtime {
152152
.expect("failed to initialize Tokio runtime")
153153
});
154154

155-
#[cfg(any(feature = "runtime-tokio", feature = "runtime-actix"))]
156155
pub fn block_on<F: std::future::Future>(future: F) -> F::Output {
157156
RUNTIME.enter(|| RUNTIME.handle().block_on(future))
158157
}

0 commit comments

Comments
 (0)