Update crates/rust-analyzer/src/cli/analysis_stats.rs

Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
This commit is contained in:
Aleksey Kladov
2020-07-29 19:56:54 +02:00
committed by GitHub
parent ba585309ec
commit 63de7bbb5b

View File

@@ -318,6 +318,6 @@ pub fn analysis_stats(
fn shuffle<T>(rng: &mut Rand32, slice: &mut [T]) {
for i in (1..slice.len()).rev() {
let idx = rng.rand_range(0..i as u32) as usize;
slice.swap(idx, i - 1)
slice.swap(idx, i)
}
}