Skip to content

Commit 5627ca8

Browse files
Format fixes
1 parent d1e91f6 commit 5627ca8

File tree

2 files changed

+5
-21
lines changed

2 files changed

+5
-21
lines changed

sqlx-core/src/rt/mod.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ use std::time::Duration;
66

77
use cfg_if::cfg_if;
88

9-
#[cfg(any(
10-
feature = "_rt-async-std",
11-
feature = "_rt-smol"
12-
))]
9+
#[cfg(any(feature = "_rt-async-std", feature = "_rt-smol"))]
1310
pub mod rt_async_io;
1411

1512
#[cfg(feature = "_rt-smol")]

sqlx-core/src/sync.rs

+4-17
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ pub struct AsyncSemaphore {
1717
// in MIRI due to the necessitated mutable aliasing):
1818
// https://github.com/launchbadge/sqlx/issues/1668
1919
#[cfg(all(
20-
any(
21-
feature = "_rt-async-std",
22-
feature = "_rt-smol"
23-
),
20+
any(feature = "_rt-async-std", feature = "_rt-smol"),
2421
not(feature = "_rt-tokio")
2522
))]
2623
inner: futures_intrusive::sync::Semaphore,
@@ -42,10 +39,7 @@ impl AsyncSemaphore {
4239

4340
AsyncSemaphore {
4441
#[cfg(all(
45-
any(
46-
feature = "_rt-async-std",
47-
feature = "_rt-smol"
48-
),
42+
any(feature = "_rt-async-std", feature = "_rt-smol"),
4943
not(feature = "_rt-tokio")
5044
))]
5145
inner: futures_intrusive::sync::Semaphore::new(fair, permits),
@@ -155,22 +149,15 @@ pub struct AsyncSemaphoreReleaser<'a> {
155149
// in MIRI due to the necessitated mutable aliasing):
156150
// https://github.com/launchbadge/sqlx/issues/1668
157151
#[cfg(all(
158-
any(
159-
feature = "_rt-async-std",
160-
feature = "_rt-smol"
161-
),
152+
any(feature = "_rt-async-std", feature = "_rt-smol"),
162153
not(feature = "_rt-tokio")
163154
))]
164155
inner: futures_intrusive::sync::SemaphoreReleaser<'a>,
165156

166157
#[cfg(feature = "_rt-tokio")]
167158
inner: tokio::sync::SemaphorePermit<'a>,
168159

169-
#[cfg(not(any(
170-
feature = "_rt-async-std",
171-
feature = "_rt-smol",
172-
feature = "_rt-tokio"
173-
)))]
160+
#[cfg(not(any(feature = "_rt-async-std", feature = "_rt-smol", feature = "_rt-tokio")))]
174161
_phantom: std::marker::PhantomData<&'a ()>,
175162
}
176163

0 commit comments

Comments
 (0)