Skip to main content

shuffle

Function shuffle 

Source
pub fn shuffle<T>(vec: &mut [T])
Expand description

Randomly permutes a slice in place.

The thread-local generator chooses the permutation without changing the slice’s contents or length. Empty and single-element slices remain unchanged.