File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 1
1
//! **Pool** for SQLx database connections.
2
2
3
3
use std:: {
4
- fmt,
5
- mem,
4
+ fmt, mem,
6
5
ops:: { Deref , DerefMut } ,
7
6
sync:: Arc ,
8
7
time:: { Duration , Instant } ,
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ use async_std::task;
4
4
use futures_core:: future:: BoxFuture ;
5
5
use futures_core:: stream:: BoxStream ;
6
6
7
+ use crate :: connection:: Connection ;
7
8
use crate :: database:: Database ;
8
9
use crate :: describe:: Describe ;
9
10
use crate :: executor:: Executor ;
10
- use crate :: connection:: Connection ;
11
11
12
12
pub struct Transaction < T >
13
13
where
@@ -96,15 +96,13 @@ where
96
96
}
97
97
}
98
98
99
- impl < T > Connection for Transaction < T >
100
- where
101
- T : Connection
99
+ impl < T > Connection for Transaction < T >
100
+ where
101
+ T : Connection ,
102
102
{
103
103
// Close is equivalent to ROLLBACK followed by CLOSE
104
104
fn close ( self ) -> BoxFuture < ' static , crate :: Result < ( ) > > {
105
- Box :: pin ( async move {
106
- self . rollback ( ) . await ?. close ( ) . await
107
- } )
105
+ Box :: pin ( async move { self . rollback ( ) . await ?. close ( ) . await } )
108
106
}
109
107
}
110
108
You can’t perform that action at this time.
0 commit comments