diff --git a/crates/rust-analyzer/src/cli/analysis_stats.rs b/crates/rust-analyzer/src/cli/analysis_stats.rs index 6b7c0897130..66d201ba66b 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) } }