Skip to content

Commit b5184e1

Browse files
committed
docs: explain the ordering clone in write_node_stack_tops
1 parent bd15c27 commit b5184e1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎crates/edr_solidity/src/tracing.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ fn write_node_stack_tops(
120120
node_idx: usize,
121121
tops: &mut std::slice::Iter<'_, Option<U256>>,
122122
) {
123+
// Cloned so that `nodes` can be mutably borrowed in the loop; the entries
124+
// are `Copy` and this only runs once per node at collection time.
123125
let ordering = nodes
124126
.get(node_idx)
125127
.expect("node indices come from the arena's own children lists")

0 commit comments

Comments
 (0)