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};
72
72
mod mysql;
73
73
#[ cfg( feature = "postgres" ) ]
74
74
mod pg;
75
+ #[ cfg( any( feature = "deadpool" , feature = "bb8" , feature = "mobc" ) ) ]
76
+ pub mod pooled_connection;
75
77
mod run_query_dsl;
76
78
mod stmt_cache;
77
79
mod transaction_manager;
78
- #[ cfg( any( feature = "deadpool" , feature = "bb8" , feature = "mobc" ) ) ]
79
- pub mod pooled_connection;
80
80
81
81
#[ cfg( feature = "mysql" ) ]
82
82
pub use self :: mysql:: AsyncMysqlConnection ;
Original file line number Diff line number Diff line change 6
6
//! * [bb8](self::bb8)
7
7
//! * [mobc](self::mobc)
8
8
9
- use crate :: { AsyncConnection , AsyncConnectionGatWorkaround , SimpleAsyncConnection } ;
10
9
use crate :: TransactionManager ;
10
+ use crate :: { AsyncConnection , AsyncConnectionGatWorkaround , SimpleAsyncConnection } ;
11
11
use std:: fmt;
12
12
use std:: marker:: PhantomData ;
13
13
use std:: ops:: DerefMut ;
@@ -60,7 +60,7 @@ impl<C> AsyncDieselConnectionManager<C> {
60
60
pub fn new ( connection_url : impl Into < String > ) -> Self {
61
61
Self {
62
62
p : PhantomData ,
63
- connection_url : connection_url. into ( )
63
+ connection_url : connection_url. into ( ) ,
64
64
}
65
65
}
66
66
}
@@ -98,12 +98,13 @@ where
98
98
{
99
99
type Backend = <C :: Target as AsyncConnection >:: Backend ;
100
100
101
- type TransactionManager = PoolTransactionManager < <C :: Target as AsyncConnection >:: TransactionManager > ;
101
+ type TransactionManager =
102
+ PoolTransactionManager < <C :: Target as AsyncConnection >:: TransactionManager > ;
102
103
103
104
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
+ ) )
107
108
}
108
109
109
110
fn load < ' conn , ' query , T > (
You can’t perform that action at this time.
0 commit comments