Skip to content

Commit

Permalink
Fixed clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
rozbb committed Sep 15, 2023
1 parent b031dd0 commit a3f3965
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/consistency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ where
// We have a special case when the old tree is a subtree of the current tree. This happens
// when the old tree is a complete binary tree OR when the old tree equals this tree (i.e.,
// nothing changed between the trees).
let oldtree_is_subtree =
slice_size.is_power_of_two() || slice_size == num_tree_leaves as usize;
let oldtree_is_subtree = slice_size.is_power_of_two() || slice_size == num_tree_leaves;

// If the old tree is a subtree, then the starting idx for the path is the subtree root
let mut path_idx = if oldtree_is_subtree {
Expand Down
2 changes: 1 addition & 1 deletion src/merkle_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ where

/// Tries to get the item at the given index
pub fn get(&self, idx: usize) -> Option<&T> {
self.leaves.get(idx as usize)
self.leaves.get(idx)
}

/// Returns all the items
Expand Down

0 comments on commit a3f3965

Please sign in to comment.