File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change 11use diesel:: prelude:: * ;
2- use diesel:: r2d2:: { self , ConnectionManager , CustomizeConnection } ;
2+ use diesel:: r2d2:: { self , ConnectionManager , CustomizeConnection , State } ;
33use prometheus:: Histogram ;
44use secrecy:: { ExposeSecret , SecretString } ;
55use std:: time:: Duration ;
@@ -75,12 +75,8 @@ impl DieselPool {
7575 }
7676 }
7777
78- pub fn state ( & self ) -> PoolState {
79- let state = self . pool . state ( ) ;
80- PoolState {
81- connections : state. connections ,
82- idle_connections : state. idle_connections ,
83- }
78+ pub fn state ( & self ) -> State {
79+ self . pool . state ( )
8480 }
8581
8682 #[ instrument( skip_all) ]
@@ -97,12 +93,6 @@ impl DieselPool {
9793 }
9894}
9995
100- #[ derive( Debug , Copy , Clone ) ]
101- pub struct PoolState {
102- pub connections : u32 ,
103- pub idle_connections : u32 ,
104- }
105-
10696pub type DieselPooledConn = r2d2:: PooledConnection < ConnectionManager < PgConnection > > ;
10797
10898pub fn oneoff_connection_with_config (
You can’t perform that action at this time.
0 commit comments