From fb693ecbf81be0146a81cc7fd95342c403eacaa9 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 23 Jan 2024 06:19:24 +0000 Subject: [PATCH] [bindings] Move additional score params from `&()` to `Default` In 26c1639ab69d6780c97a118f09e42cb42304088a (and later in 50c55dcf32466e3ccf17acea50697fc664950deb) we switched to using `Default::default()` to initialize `()` for scoring parameters in tests. A number of `()`s slipped back in recently, which we replace here. --- lightning/src/util/test_utils.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lightning/src/util/test_utils.rs b/lightning/src/util/test_utils.rs index 6cbe53ab..e5489ac8 100644 --- a/lightning/src/util/test_utils.rs +++ b/lightning/src/util/test_utils.rs @@ -168,7 +168,7 @@ impl<'a> Router for TestRouter<'a> { details: first_hops[idx], payer_node_id: &node_id, }); - scorer.channel_penalty_msat(&candidate, usage, &()); + scorer.channel_penalty_msat(&candidate, usage, &Default::default()); continue; } } @@ -180,7 +180,7 @@ impl<'a> Router for TestRouter<'a> { info: directed, short_channel_id: hop.short_channel_id, }); - scorer.channel_penalty_msat(&candidate, usage, &()); + scorer.channel_penalty_msat(&candidate, usage, &Default::default()); } else { let target_node_id = NodeId::from_pubkey(&hop.pubkey); let route_hint = RouteHintHop { @@ -195,7 +195,7 @@ impl<'a> Router for TestRouter<'a> { hint: &route_hint, target_node_id: &target_node_id, }); - scorer.channel_penalty_msat(&candidate, usage, &()); + scorer.channel_penalty_msat(&candidate, usage, &Default::default()); } prev_hop_node = &hop.pubkey; } -- 2.30.2