Satisfy Clippy, remove non-tree-states code

This commit is contained in:
Michael Sproul
2022-03-28 11:42:55 +11:00
parent 705cba6443
commit c5212d0f98
45 changed files with 129 additions and 1153 deletions

View File

@@ -558,17 +558,6 @@ pub fn load_variable_list_from_db<F: VariableLengthField<E>, E: EthSpec, S: KeyV
Ok(result)
}
/// Index into a field of the state, avoiding out of bounds and division by 0.
#[cfg(not(feature = "milhouse"))]
fn safe_modulo_index<T: Copy>(values: &[T], index: u64) -> Result<T, ChunkError> {
if values.is_empty() {
Err(ChunkError::ZeroLengthVector)
} else {
Ok(values[index as usize % values.len()])
}
}
#[cfg(feature = "milhouse")]
fn safe_modulo_index_list<T: TreeHash + Copy, N: Unsigned>(
values: &VList<T, N>,
index: u64,
@@ -583,7 +572,6 @@ fn safe_modulo_index_list<T: TreeHash + Copy, N: Unsigned>(
}
}
#[cfg(feature = "milhouse")]
fn safe_modulo_index_vect<T: TreeHash + Copy, N: Unsigned>(
values: &FixedVector<T, N>,
index: u64,