expect instead of unwrap
Co-authored-by: Philipp Gackstatter <PhilippGackstatter@users.noreply.github.com>
This commit is contained in:
parent
cc67a602be
commit
7c5f8b3723
1 changed files with 1 additions and 1 deletions
|
@ -283,7 +283,7 @@ impl Iterator for SparseMerklePathIter<'_> {
|
||||||
self.next_depth = this_depth.get() - 1;
|
self.next_depth = this_depth.get() - 1;
|
||||||
|
|
||||||
// `this_depth` is only ever decreasing, so it can't ever exceed `self.path.depth()`.
|
// `this_depth` is only ever decreasing, so it can't ever exceed `self.path.depth()`.
|
||||||
let node = self.path.at_depth(this_depth).unwrap();
|
let node = self.path.at_depth(this_depth).expect("current depth should never exceed the path depth");
|
||||||
Some(node)
|
Some(node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue