fn shuffled_players<P>(secret_ids: &[P]) -> Vec<(usize, &P)> {
    let mut result = secret_ids.iter().enumerate().collect::<Vec<_>>();
    result.shuffle(&mut thread_rng());
    result
}
/// Iterate over all players in a random order.
Iterate over all players in a random order.
Iterate over all players in a random order .
fn shuffled_players<P>(secret_ids: &[P]) -> Vec<(usize, &P)> {
    let mut result = secret_ids.iter().enumerate().collect::<Vec<_>>();
    result.shuffle(&mut thread_rng());
    result
}
fn shuffled_players < P > ( secret_ids : & [ P ] ) -> Vec < ( usize , & P ) > { let mut result = secret_ids . iter ( ) . enumerate ( ) . collect :: < Vec < _ > > ( ) ; result . shuffle ( & mut thread_rng ( ) ) ; result }
Iterate over all players in a random order.
Iterate over all players in a random order .
secret_ids
&[P]
secret_ids
&[P]