Skip to content

Commit e2fe813

Browse files
committed
f Quick-fix test_threaded_payment_retries
... as the closure behavior slightly changed from edition 2018: using `node_ref.0` inside the closure won't result in `node_ref` being captured. However, as the comment there states, we really want to fix this by using scoped threads which are available now.
1 parent 1082524 commit e2fe813

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lightning/src/ln/payment_tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3325,6 +3325,7 @@ fn test_threaded_payment_retries() {
33253325
// We really want std::thread::scope, but its not stable until 1.63. Until then, we get unsafe.
33263326
let node_ref = NodePtr::from_node(&nodes[0]);
33273327
move || {
3328+
let _ = &node_ref;
33283329
let node_a = unsafe { &*node_ref.0 };
33293330
while Instant::now() < end_time {
33303331
node_a.node.get_and_clear_pending_events(); // wipe the PendingHTLCsForwardable

0 commit comments

Comments
 (0)