Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKitsune committed Oct 27, 2023
1 parent 540d97f commit 7f944a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions crates/tree_availability/src/world_tree/tree_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,10 @@ mod tests {

let root = ref_tree.root();

for i in 0..NUM_IDENTITIES {
for (i, identity) in identities.iter().enumerate().take(NUM_IDENTITIES)
{
let proof_from_world_tree = tree_data
.get_inclusion_proof(identities[i], Some(root))
.get_inclusion_proof(*identity, Some(root))
.await
.unwrap();

Expand All @@ -198,7 +199,7 @@ mod tests {
// Then you can apply the remaining updates
tree_data.insert_many_at(5, &identities[5..]).await;

for i in 0..5 {
for (i, identity) in identities.iter().enumerate().take(5) {
let proof_from_world_tree = tree_data
.get_inclusion_proof(identities[i], Some(root))
.await
Expand All @@ -215,7 +216,7 @@ mod tests {

// Apply an update to the tree one identity at a time to apply all changes to the tree history cache
for (idx, identity) in identities.into_iter().enumerate() {
tree_data.insert_many_at(idx, &vec![identity]).await;
tree_data.insert_many_at(idx, &[identity]).await;
}

// The tree history should not be larger than the tree history size
Expand Down
2 changes: 1 addition & 1 deletion crates/tree_availability/tests/inclusion_proof.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async fn test_inclusion_proof() -> eyre::Result<()> {
mock_world_id
.delete_identities(
[U256::zero(); 8],
pack_indices(&vec![1]).into(),
pack_indices(&[1]).into(),
U256::zero(),
U256::zero(),
)
Expand Down

0 comments on commit 7f944a1

Please sign in to comment.