refactor: remove redundant clone() in CursorSubNode::new (#21493)

This commit is contained in:
katikatidimon
2026-01-28 13:33:10 +01:00
committed by GitHub
parent 231292b58e
commit e0a0a0d5fb

View File

@@ -60,8 +60,9 @@ impl CursorSubNode {
let position = node.as_ref().filter(|n| n.root_hash.is_none()).map_or(
SubNodePosition::ParentBranch,
|n| {
let mut child_index_range = CHILD_INDEX_RANGE;
SubNodePosition::Child(
CHILD_INDEX_RANGE.clone().find(|i| n.state_mask.is_bit_set(*i)).unwrap(),
child_index_range.find(|i| n.state_mask.is_bit_set(*i)).unwrap(),
)
},
);