File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ impl AsyncConnection for AsyncPgConnection {
123123 . map_err ( ErrorHelper ) ?;
124124 tokio:: spawn ( async move {
125125 if let Err ( e) = connection. await {
126- eprintln ! ( "connection error: {}" , e ) ;
126+ eprintln ! ( "connection error: {e}" ) ;
127127 }
128128 } ) ;
129129 Self :: try_from ( client) . await
Original file line number Diff line number Diff line change @@ -39,14 +39,17 @@ impl fmt::Display for PoolError {
3939
4040impl std:: error:: Error for PoolError { }
4141
42+ type SetupCallback < C > =
43+ Box < dyn Fn ( & str ) -> future:: BoxFuture < diesel:: ConnectionResult < C > > + Send + Sync > ;
44+
4245/// An connection manager for use with diesel-async.
4346///
4447/// See the concrete pool implementations for examples:
4548/// * [deadpool](self::deadpool)
4649/// * [bb8](self::bb8)
4750/// * [mobc](self::mobc)
4851pub struct AsyncDieselConnectionManager < C > {
49- setup : Box < dyn Fn ( & str ) -> future :: BoxFuture < diesel :: ConnectionResult < C > > + Send + Sync > ,
52+ setup : SetupCallback < C > ,
5053 connection_url : String ,
5154}
5255
Original file line number Diff line number Diff line change @@ -292,7 +292,7 @@ where
292292 let start_transaction_sql = match transaction_state. transaction_depth ( ) {
293293 None => Cow :: from ( "BEGIN" ) ,
294294 Some ( transaction_depth) => {
295- Cow :: from ( format ! ( "SAVEPOINT diesel_savepoint_{}" , transaction_depth ) )
295+ Cow :: from ( format ! ( "SAVEPOINT diesel_savepoint_{transaction_depth}" ) )
296296 }
297297 } ;
298298 conn. batch_execute ( & start_transaction_sql) . await ?;
You can’t perform that action at this time.
0 commit comments