From e2fe813ad5edbbb66e1aef7817609ad8ea6eff60 Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Wed, 1 Nov 2023 10:16:33 +0100 Subject: [PATCH] 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. --- lightning/src/ln/payment_tests.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/lightning/src/ln/payment_tests.rs b/lightning/src/ln/payment_tests.rs index c8a2c45f96f..467e07c6c01 100644 --- a/lightning/src/ln/payment_tests.rs +++ b/lightning/src/ln/payment_tests.rs @@ -3325,6 +3325,7 @@ fn test_threaded_payment_retries() { // We really want std::thread::scope, but its not stable until 1.63. Until then, we get unsafe. let node_ref = NodePtr::from_node(&nodes[0]); move || { + let _ = &node_ref; let node_a = unsafe { &*node_ref.0 }; while Instant::now() < end_time { node_a.node.get_and_clear_pending_events(); // wipe the PendingHTLCsForwardable