Skip to content

Commit

Permalink
Finessed a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
awelc committed Dec 27, 2024
1 parent b1dc2aa commit c86f112
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ fun test() {
let ctx = &mut tx_context::dummy();
let mut table = linked_table::new<u64, u8>(ctx);
table.push_back(7, 42);
// linked table contains the following line which (interestingly) uses global location
// for the write of `next` but only if we call the `push_back` function twice (otherwise
// it looks like it creates a temporary local variable for this assignment)
// linked table contains the following line of code which uses global location
// for the write of `next` (we need to call `push_back` twice to actually exercise
// this line of code):
//
// field::borrow_mut<K, Node<K, V>>(&mut table.id, old_tail_k).next = option::some(k);
table.push_back(42, 7);
Expand Down

0 comments on commit c86f112

Please sign in to comment.