mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Address clippy lints in tree-states (#4414)
* Address some clippy lints * Box errors to fix error size lint * Add Default impl for Validator * Address more clippy lints * Re-implement `check_state_diff` * Fix misc test compile errors
This commit is contained in:
@@ -234,7 +234,7 @@ impl<'a, E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>>
|
||||
// of the pre iterator.
|
||||
None => {
|
||||
let continuation_data = continuation_data.take();
|
||||
let start_slot = Slot::from(iter.limit);
|
||||
let start_slot = iter.limit;
|
||||
|
||||
*self = PostFinalizationLazy {
|
||||
continuation_data,
|
||||
|
||||
@@ -331,7 +331,7 @@ mod tests {
|
||||
|
||||
let xor_diff = XorDiff::compute(&x_values, &y_values).unwrap();
|
||||
|
||||
let mut y_from_xor = x_values.clone();
|
||||
let mut y_from_xor = x_values;
|
||||
xor_diff.apply(&mut y_from_xor).unwrap();
|
||||
|
||||
assert_eq!(y_values, y_from_xor);
|
||||
|
||||
@@ -1573,7 +1573,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
||||
(start_slot.as_u64()..=end_slot.as_u64())
|
||||
.map(Slot::new)
|
||||
.map(|slot| self.get_cold_blinded_block_by_slot(slot)),
|
||||
|iter| iter.filter_map(|x| x).collect(),
|
||||
|iter| iter.flatten().collect(),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ impl<E: EthSpec> KeyValueStore<E> for LevelDB<E> {
|
||||
}
|
||||
|
||||
fn iter_column_from<K: Key>(&self, column: DBColumn, from: &[u8]) -> ColumnIter<K> {
|
||||
let start_key = BytesKey::from_vec(get_key_for_col(column.into(), &from));
|
||||
let start_key = BytesKey::from_vec(get_key_for_col(column.into(), from));
|
||||
|
||||
let iter = self.db.iter(self.read_options());
|
||||
iter.seek(&start_key);
|
||||
|
||||
Reference in New Issue
Block a user