fn drop(&mut self) {
        for mut conn in self.connections.write().unwrap().drain(..) {
            conn.pool.take();

            self.emit_event(|handler| {
                handler.handle_connection_closed_event(
                    conn.closed_event(ConnectionClosedReason::PoolClosed),
                );
            });
        }

        self.emit_event(|handler| {
            handler.handle_pool_closed_event(PoolClosedEvent {
                address: self.address.clone(),
            });
        });
    }
/// Automatic cleanup for the connection pool. This is defined on `ConnectionPoolInner` rather
/// than `ConnectionPool` so that it only gets run once all (non-weak) references to the
/// `ConnectionPoolInner` are dropped.
Automatic cleanup for the connection pool.
Automatic cleanup for the connection pool .
fn drop(&mut self) {
        for mut conn in self.connections.write().unwrap().drain(..) {
            conn.pool.take();
            self.emit_event(|handler| {
                handler.handle_connection_closed_event(
                    conn.closed_event(ConnectionClosedReason::PoolClosed),
                );
            });
        }
        self.emit_event(|handler| {
            handler.handle_pool_closed_event(PoolClosedEvent {
                address: self.address.clone(),
            });
        });
    }
fn drop ( & mut self ) { for mut conn in self . connections . write ( ) . unwrap ( ) . drain ( .. ) { conn . pool . take ( ) ; self . emit_event ( | handler | { handler . handle_connection_closed_event ( conn . closed_event ( ConnectionClosedReason :: PoolClosed ) , ) ; } ) ; } self . emit_event ( | handler | { handler . handle_pool_closed_event ( PoolClosedEvent { address : self . address . clone ( ) , } ) ; } ) ; }
Automatic cleanup for the connection pool.
Automatic cleanup for the connection pool .
&mut self
&mut self