From d6bf1a611997ad09c6ad74c25791e49d1f52517c Mon Sep 17 00:00:00 2001 From: mjkeating Date: Fri, 23 Nov 2018 19:29:03 -0800 Subject: [PATCH] removed unnecessary call to saturated_sub() in vec_shuffle --- beacon_chain/utils/vec_shuffle/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon_chain/utils/vec_shuffle/src/lib.rs b/beacon_chain/utils/vec_shuffle/src/lib.rs index 184c5e165..72cbd430c 100644 --- a/beacon_chain/utils/vec_shuffle/src/lib.rs +++ b/beacon_chain/utils/vec_shuffle/src/lib.rs @@ -29,7 +29,7 @@ pub fn shuffle(seed: &[u8], mut list: Vec) -> Result, ShuffleErr> { return Ok(list); } - for i in 0..(list.len().saturating_sub(1)) { + for i in 0..(list.len() - 1) { let n = list.len() - i; let j = rng.rand_range(n as u32) as usize + i; list.swap(i, j);