From 585089e687063f32797fd65649b2a938c4e32109 Mon Sep 17 00:00:00 2001 From: Squirrel Date: Mon, 21 Mar 2022 14:47:47 +0000 Subject: [PATCH] express intent better (#1099) --- cumulus/pallets/xcmp-queue/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cumulus/pallets/xcmp-queue/src/lib.rs b/cumulus/pallets/xcmp-queue/src/lib.rs index 947439ba8b..98fafb8846 100644 --- a/cumulus/pallets/xcmp-queue/src/lib.rs +++ b/cumulus/pallets/xcmp-queue/src/lib.rs @@ -571,9 +571,7 @@ impl Pallet { let mut shuffled = (0..len).collect::>(); for i in 0..len { let j = (rng.next_u32() as usize) % len; - let a = shuffled[i]; - shuffled[i] = shuffled[j]; - shuffled[j] = a; + shuffled.as_mut_slice().swap(i, j); } shuffled }