From 63de7bbb5b4cfb4797adb303ce2a48cf8ff2cff4 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 29 Jul 2020 19:56:54 +0200 Subject: [PATCH] Update crates/rust-analyzer/src/cli/analysis_stats.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Laurențiu Nicola --- crates/rust-analyzer/src/cli/analysis_stats.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/cli/analysis_stats.rs b/crates/rust-analyzer/src/cli/analysis_stats.rs index 6b7c089713..66d201ba66 100644 --- a/crates/rust-analyzer/src/cli/analysis_stats.rs +++ b/crates/rust-analyzer/src/cli/analysis_stats.rs @@ -318,6 +318,6 @@ pub fn analysis_stats( fn shuffle(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) } }