File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -72,11 +72,11 @@ use futures::{Future, Stream};
7272mod mysql;
7373#[ cfg( feature = "postgres" ) ]
7474mod pg;
75+ #[ cfg( any( feature = "deadpool" , feature = "bb8" , feature = "mobc" ) ) ]
76+ pub mod pooled_connection;
7577mod run_query_dsl;
7678mod stmt_cache;
7779mod transaction_manager;
78- #[ cfg( any( feature = "deadpool" , feature = "bb8" , feature = "mobc" ) ) ]
79- pub mod pooled_connection;
8080
8181#[ cfg( feature = "mysql" ) ]
8282pub use self :: mysql:: AsyncMysqlConnection ;
Original file line number Diff line number Diff line change 66//! * [bb8](self::bb8)
77//! * [mobc](self::mobc)
88
9- use crate :: { AsyncConnection , AsyncConnectionGatWorkaround , SimpleAsyncConnection } ;
109use crate :: TransactionManager ;
10+ use crate :: { AsyncConnection , AsyncConnectionGatWorkaround , SimpleAsyncConnection } ;
1111use std:: fmt;
1212use std:: marker:: PhantomData ;
1313use std:: ops:: DerefMut ;
@@ -60,7 +60,7 @@ impl<C> AsyncDieselConnectionManager<C> {
6060 pub fn new ( connection_url : impl Into < String > ) -> Self {
6161 Self {
6262 p : PhantomData ,
63- connection_url : connection_url. into ( )
63+ connection_url : connection_url. into ( ) ,
6464 }
6565 }
6666}
@@ -98,12 +98,13 @@ where
9898{
9999 type Backend = <C :: Target as AsyncConnection >:: Backend ;
100100
101- type TransactionManager = PoolTransactionManager < <C :: Target as AsyncConnection >:: TransactionManager > ;
101+ type TransactionManager =
102+ PoolTransactionManager < <C :: Target as AsyncConnection >:: TransactionManager > ;
102103
103104 async fn establish ( _database_url : & str ) -> diesel:: ConnectionResult < Self > {
104- Err ( diesel:: result:: ConnectionError :: BadConnection ( String :: from (
105- "Cannot directly establish a pooled connection" ,
106- ) ) )
105+ Err ( diesel:: result:: ConnectionError :: BadConnection (
106+ String :: from ( "Cannot directly establish a pooled connection" ) ,
107+ ) )
107108 }
108109
109110 fn load < ' conn , ' query , T > (
You can’t perform that action at this time.
0 commit comments