RIMOV core::rand
This commit is contained in:
@@ -350,7 +350,7 @@ impl Rng {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Shuffle a mutable vec in place
|
/// Shuffle a mutable vec in place
|
||||||
fn shuffle_mut<T>(values: &[mut T]) {
|
fn shuffle_mut<T>(values: &mut [T]) {
|
||||||
let mut i = values.len();
|
let mut i = values.len();
|
||||||
while i >= 2u {
|
while i >= 2u {
|
||||||
// invariant: elements with index >= i have been locked in place.
|
// invariant: elements with index >= i have been locked in place.
|
||||||
|
|||||||
Reference in New Issue
Block a user