mirror of
https://github.com/arnaucube/miden-crypto.git
synced 2026-01-12 00:51:29 +01:00
feat: add from_elements to NodeIndex
This commit is contained in:
@@ -73,7 +73,7 @@ impl MerkleTree {
|
||||
if index.is_root() {
|
||||
return Err(MerkleError::DepthTooSmall(index.depth()));
|
||||
} else if index.depth() > self.depth() {
|
||||
return Err(MerkleError::DepthTooBig(index.depth()));
|
||||
return Err(MerkleError::DepthTooBig(index.depth() as u64));
|
||||
} else if !index.is_valid() {
|
||||
return Err(MerkleError::InvalidIndex(index));
|
||||
}
|
||||
@@ -93,7 +93,7 @@ impl MerkleTree {
|
||||
if index.is_root() {
|
||||
return Err(MerkleError::DepthTooSmall(index.depth()));
|
||||
} else if index.depth() > self.depth() {
|
||||
return Err(MerkleError::DepthTooBig(index.depth()));
|
||||
return Err(MerkleError::DepthTooBig(index.depth() as u64));
|
||||
} else if !index.is_valid() {
|
||||
return Err(MerkleError::InvalidIndex(index));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user