fn pop_random<A>(v: &mut Vec<A>, rng: &mut ChaCha8Rng) -> Option<A> {
    let v_len = v.len();
    if v_len <= 1 {
        v.pop()
    } else {
        let ix = rng.gen_range(0..v.len());
        let el = v.remove(ix);
        Some(el)
    }
}
/// Auxiliary function to pop a random element from a vector.
Auxiliary function to pop a random element from a vector.
Auxiliary function to pop a random element from a vector .
fn pop_random<A>(v: &mut Vec<A>, rng: &mut ChaCha8Rng) -> Option<A> {
    let v_len = v.len();
    if v_len <= 1 {
        v.pop()
    } else {
        let ix = rng.gen_range(0..v.len());
        let el = v.remove(ix);
        Some(el)
    }
}
fn pop_random < A > ( v : & mut Vec < A > , rng : & mut ChaCha8Rng ) -> Option < A > { let v_len = v . len ( ) ; if v_len <= 1 { v . pop ( ) } else { let ix = rng . gen_range ( 0 .. v . len ( ) ) ; let el = v . remove ( ix ) ; Some ( el ) } }
Auxiliary function to pop a random element from a vector.
Auxiliary function to pop a random element from a vector .
v
&mut Vec<A>
rng
&mut ChaCha8Rng
v
&mut Vec<A>
rng
&mut ChaCha8Rng