mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Clippy 1.49.0 updates and dht persistence test fix (#2156)
## Issue Addressed `test_dht_persistence` failing ## Proposed Changes Bind `NetworkService::start` to an underscore prefixed variable rather than `_`. `_` was causing it to be dropped immediately This was failing 5/100 times before this update, but I haven't been able to get it to fail after updating it Co-authored-by: realbigsean <seananderson33@gmail.com>
This commit is contained in:
@@ -24,15 +24,15 @@ pub fn u64_leaf_count(len: usize) -> usize {
|
||||
(len + vals_per_chunk - 1) / vals_per_chunk
|
||||
}
|
||||
|
||||
pub fn hash256_iter<'a>(
|
||||
values: &'a [Hash256],
|
||||
) -> impl Iterator<Item = [u8; BYTES_PER_CHUNK]> + ExactSizeIterator + 'a {
|
||||
pub fn hash256_iter(
|
||||
values: &[Hash256],
|
||||
) -> impl Iterator<Item = [u8; BYTES_PER_CHUNK]> + ExactSizeIterator + '_ {
|
||||
values.iter().copied().map(Hash256::to_fixed_bytes)
|
||||
}
|
||||
|
||||
pub fn u64_iter<'a>(
|
||||
values: &'a [u64],
|
||||
) -> impl Iterator<Item = [u8; BYTES_PER_CHUNK]> + ExactSizeIterator + 'a {
|
||||
pub fn u64_iter(
|
||||
values: &[u64],
|
||||
) -> impl Iterator<Item = [u8; BYTES_PER_CHUNK]> + ExactSizeIterator + '_ {
|
||||
let type_size = size_of::<u64>();
|
||||
let vals_per_chunk = BYTES_PER_CHUNK / type_size;
|
||||
values.chunks(vals_per_chunk).map(move |xs| {
|
||||
|
||||
Reference in New Issue
Block a user