File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -988,7 +988,7 @@ impl PoolRefiller {
988988 // `last_error` must not be `None` if there is a possibility of the pool
989989 // being empty.
990990 fn update_shared_conns ( & mut self , last_error : Option < ConnectionError > ) {
991- let new_conns = if ! self . has_connections ( ) {
991+ let new_conns = if self . is_empty ( ) {
992992 Arc :: new ( MaybePoolConnections :: Broken ( last_error. unwrap ( ) ) )
993993 } else {
994994 let new_conns = if let Some ( sharder) = self . sharder . as_ref ( ) {
@@ -1046,7 +1046,7 @@ impl PoolRefiller {
10461046 self . conns[ shard_id] . len( ) ,
10471047 self . active_connection_count( ) ,
10481048 ) ;
1049- if ! self . has_connections ( ) {
1049+ if self . is_empty ( ) {
10501050 let _ = self . pool_empty_notifier . send ( ( ) ) ;
10511051 }
10521052 self . update_shared_conns ( Some ( last_error) ) ;
@@ -1152,10 +1152,6 @@ impl PoolRefiller {
11521152 ) ;
11531153 }
11541154
1155- fn has_connections ( & self ) -> bool {
1156- self . conns . iter ( ) . any ( |v| !v. is_empty ( ) )
1157- }
1158-
11591155 fn active_connection_count ( & self ) -> usize {
11601156 self . conns . iter ( ) . map ( Vec :: len) . sum :: < usize > ( )
11611157 }
You can’t perform that action at this time.
0 commit comments