Skip to content

Commit 7b42bfc

Browse files
committed
chore: run rustfmt
1 parent 9cd88ca commit 7b42bfc

File tree

2 files changed

+47
-47
lines changed

2 files changed

+47
-47
lines changed

sqlx-core/src/pool/inner.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl<DB: Database> PoolInner<DB> {
171171
Poll::Pending
172172
}
173173
})
174-
.await
174+
.await
175175
} else {
176176
close_event.do_until(acquire_self).await
177177
}
@@ -649,4 +649,4 @@ impl<DB: Database> Drop for DecrementSizeGuard<DB> {
649649
self.pool.semaphore.release(1);
650650
}
651651
}
652-
}
652+
}

sqlx-core/src/pool/options.rs

+45-45
Original file line numberDiff line numberDiff line change
@@ -48,43 +48,43 @@ pub struct PoolOptions<DB: Database> {
4848
pub(crate) before_connect: Option<
4949
Arc<
5050
dyn Fn(
51-
&<DB::Connection as Connection>::Options,
52-
u32,
53-
)
54-
-> BoxFuture<'_, Result<Cow<'_, <DB::Connection as Connection>::Options>, Error>>
55-
+ 'static
56-
+ Send
57-
+ Sync,
51+
&<DB::Connection as Connection>::Options,
52+
u32,
53+
)
54+
-> BoxFuture<'_, Result<Cow<'_, <DB::Connection as Connection>::Options>, Error>>
55+
+ 'static
56+
+ Send
57+
+ Sync,
5858
>,
5959
>,
6060
pub(crate) after_connect: Option<
6161
Arc<
6262
dyn Fn(&mut DB::Connection, PoolConnectionMetadata) -> BoxFuture<'_, Result<(), Error>>
63-
+ 'static
64-
+ Send
65-
+ Sync,
63+
+ 'static
64+
+ Send
65+
+ Sync,
6666
>,
6767
>,
6868
pub(crate) before_acquire: Option<
6969
Arc<
7070
dyn Fn(
71-
&mut DB::Connection,
72-
PoolConnectionMetadata,
73-
) -> BoxFuture<'_, Result<bool, Error>>
74-
+ 'static
75-
+ Send
76-
+ Sync,
71+
&mut DB::Connection,
72+
PoolConnectionMetadata,
73+
) -> BoxFuture<'_, Result<bool, Error>>
74+
+ 'static
75+
+ Send
76+
+ Sync,
7777
>,
7878
>,
7979
pub(crate) after_release: Option<
8080
Arc<
8181
dyn Fn(
82-
&mut DB::Connection,
83-
PoolConnectionMetadata,
84-
) -> BoxFuture<'_, Result<bool, Error>>
85-
+ 'static
86-
+ Send
87-
+ Sync,
82+
&mut DB::Connection,
83+
PoolConnectionMetadata,
84+
) -> BoxFuture<'_, Result<bool, Error>>
85+
+ 'static
86+
+ Send
87+
+ Sync,
8888
>,
8989
>,
9090
pub(crate) max_connections: u32,
@@ -389,14 +389,14 @@ impl<DB: Database> PoolOptions<DB> {
389389
/// For a discussion on why `Box::pin()` is required, see [the type-level docs][Self].
390390
pub fn before_connect<F>(mut self, callback: F) -> Self
391391
where
392-
for<'c> F: Fn(
393-
&'c <DB::Connection as Connection>::Options,
394-
u32,
395-
)
396-
-> BoxFuture<'c, crate::Result<Cow<'c, <DB::Connection as Connection>::Options>>>
397-
+ 'static
398-
+ Send
399-
+ Sync,
392+
for<'c> F: Fn(
393+
&'c <DB::Connection as Connection>::Options,
394+
u32,
395+
)
396+
-> BoxFuture<'c, crate::Result<Cow<'c, <DB::Connection as Connection>::Options>>>
397+
+ 'static
398+
+ Send
399+
+ Sync,
400400
{
401401
self.before_connect = Some(Arc::new(callback));
402402
self
@@ -442,12 +442,12 @@ impl<DB: Database> PoolOptions<DB> {
442442
/// For a discussion on why `Box::pin()` is required, see [the type-level docs][Self].
443443
pub fn after_connect<F>(mut self, callback: F) -> Self
444444
where
445-
// We're passing the `PoolConnectionMetadata` here mostly for future-proofing.
446-
// `age` and `idle_for` are obviously not useful for fresh connections.
447-
for<'c> F: Fn(&'c mut DB::Connection, PoolConnectionMetadata) -> BoxFuture<'c, Result<(), Error>>
448-
+ 'static
449-
+ Send
450-
+ Sync,
445+
// We're passing the `PoolConnectionMetadata` here mostly for future-proofing.
446+
// `age` and `idle_for` are obviously not useful for fresh connections.
447+
for<'c> F: Fn(&'c mut DB::Connection, PoolConnectionMetadata) -> BoxFuture<'c, Result<(), Error>>
448+
+ 'static
449+
+ Send
450+
+ Sync,
451451
{
452452
self.after_connect = Some(Arc::new(callback));
453453
self
@@ -497,10 +497,10 @@ impl<DB: Database> PoolOptions<DB> {
497497
/// For a discussion on why `Box::pin()` is required, see [the type-level docs][Self].
498498
pub fn before_acquire<F>(mut self, callback: F) -> Self
499499
where
500-
for<'c> F: Fn(&'c mut DB::Connection, PoolConnectionMetadata) -> BoxFuture<'c, Result<bool, Error>>
501-
+ 'static
502-
+ Send
503-
+ Sync,
500+
for<'c> F: Fn(&'c mut DB::Connection, PoolConnectionMetadata) -> BoxFuture<'c, Result<bool, Error>>
501+
+ 'static
502+
+ Send
503+
+ Sync,
504504
{
505505
self.before_acquire = Some(Arc::new(callback));
506506
self
@@ -554,10 +554,10 @@ impl<DB: Database> PoolOptions<DB> {
554554
/// # }
555555
pub fn after_release<F>(mut self, callback: F) -> Self
556556
where
557-
for<'c> F: Fn(&'c mut DB::Connection, PoolConnectionMetadata) -> BoxFuture<'c, Result<bool, Error>>
558-
+ 'static
559-
+ Send
560-
+ Sync,
557+
for<'c> F: Fn(&'c mut DB::Connection, PoolConnectionMetadata) -> BoxFuture<'c, Result<bool, Error>>
558+
+ 'static
559+
+ Send
560+
+ Sync,
561561
{
562562
self.after_release = Some(Arc::new(callback));
563563
self
@@ -656,4 +656,4 @@ impl<DB: Database> Debug for PoolOptions<DB> {
656656
.field("test_before_acquire", &self.test_before_acquire)
657657
.finish()
658658
}
659-
}
659+
}

0 commit comments

Comments
 (0)