pub fn remove_random(&mut self) -> Option<SocketAddr> {
        if self.servers.is_empty() {
            None
        } else {
            let mut rng = thread_rng();
            let index = rng.gen_range(0..self.servers.len());
            Some(self.servers.swap_remove(index))
        }
    }
// TODO: maybe make iterator and remove rng
maybe make iterator and remove rng
maybe make iterator and remove rng
pub fn remove_random(&mut self) -> Option<SocketAddr> {
        if self.servers.is_empty() {
            None
        } else {
            let mut rng = thread_rng();
            let index = rng.gen_range(0..self.servers.len());
            Some(self.servers.swap_remove(index))
        }
    }
pub fn remove_random ( & mut self ) -> Option < SocketAddr > { if self . servers . is_empty ( ) { None } else { let mut rng = thread_rng ( ) ; let index = rng . gen_range ( 0 .. self . servers . len ( ) ) ; Some ( self . servers . swap_remove ( index ) ) } }
TODO: maybe make iterator and remove rng
TODO : maybe make iterator and remove rng
&mut self
&mut self