Skip to content

Commit

Permalink
make tests compile
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Nov 17, 2023
1 parent 1764a25 commit 4c15a76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
11 changes: 4 additions & 7 deletions crates/stages/src/stages/index_account_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -546,8 +546,8 @@ mod tests {
.iter()
.chunks(sharded_key::NUM_OF_INDICES_IN_SHARD)
.into_iter()
.map(|chunks| chunks.map(|i| *i as usize).collect::<Vec<usize>>())
.collect::<Vec<_>>();
.map(|chunks| chunks.copied().collect::<Vec<_>>())
.collect::<Vec<Vec<_>>>();
let last_chunk = chunks.pop();

chunks.into_iter().for_each(|list| {
Expand All @@ -556,16 +556,13 @@ mod tests {
address,
*list.last().expect("Chuck does not return empty list")
as BlockNumber,
) as ShardedKey<Address>,
),
list,
);
});

if let Some(last_list) = last_chunk {
result.insert(
ShardedKey::new(address, u64::MAX) as ShardedKey<Address>,
last_list,
);
result.insert(ShardedKey::new(address, u64::MAX), last_list);
};
}

Expand Down
4 changes: 2 additions & 2 deletions crates/stages/src/stages/index_storage_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,8 +563,8 @@ mod tests {
.iter()
.chunks(sharded_key::NUM_OF_INDICES_IN_SHARD)
.into_iter()
.map(|chunks| chunks.map(|i| *i as usize).collect::<Vec<usize>>())
.collect::<Vec<_>>();
.map(|chunks| chunks.copied().collect::<Vec<u64>>())
.collect::<Vec<Vec<_>>>();
let last_chunk = chunks.pop();

chunks.into_iter().for_each(|list| {
Expand Down

0 comments on commit 4c15a76

Please sign in to comment.