mirror of https://github.com/rust-lang/rust.git
RIMOV core::rand
This commit is contained in:
parent
2d2ed075e3
commit
3a3f7b8e55
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue