diff --git a/beacon_chain/transition/src/delegation/validator.rs b/beacon_chain/transition/src/delegation/validator.rs index 0dc0d5f16..9c6019d72 100644 --- a/beacon_chain/transition/src/delegation/validator.rs +++ b/beacon_chain/transition/src/delegation/validator.rs @@ -37,7 +37,10 @@ fn honey_badger_split(list: &Vec, n: usize) -> Vec> { let mut split_list: Vec> = vec![]; let list_length = list.len(); for i in 0..n { - let partition = list.get(list_length*i/n..list_length*(i+1)/n).unwrap(); // cannot go out of bounds + let partition = match list.get(list_length*i/n..list_length*(i+1)/n) { + Some(v) => v, + None => unreachable!(), + }; split_list.push(partition.to_vec()); } split_list