From 955302b5229003fbe21c1cea5b2ef5cfa9a67639 Mon Sep 17 00:00:00 2001 From: Jeffrey Czyz Date: Fri, 28 Jan 2022 08:44:17 -0600 Subject: [PATCH] f - Remove redundant closure --- lightning/src/routing/scoring.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lightning/src/routing/scoring.rs b/lightning/src/routing/scoring.rs index 100363b68..1600ae071 100644 --- a/lightning/src/routing/scoring.rs +++ b/lightning/src/routing/scoring.rs @@ -695,7 +695,7 @@ impl> Score for ProbabilisticScorer { if hop.short_channel_id == short_channel_id { self.channel_liquidities .entry(hop.short_channel_id) - .or_insert_with(|| ChannelLiquidity::new()) + .or_insert_with(ChannelLiquidity::new) .as_directed_mut(&source, &target, capacity_msat) .failed_at_channel(amount_msat); break; @@ -703,7 +703,7 @@ impl> Score for ProbabilisticScorer { self.channel_liquidities .entry(hop.short_channel_id) - .or_insert_with(|| ChannelLiquidity::new()) + .or_insert_with(ChannelLiquidity::new) .as_directed_mut(&source, &target, capacity_msat) .failed_downstream(amount_msat); } @@ -728,7 +728,7 @@ impl> Score for ProbabilisticScorer { self.channel_liquidities .entry(hop.short_channel_id) - .or_insert_with(|| ChannelLiquidity::new()) + .or_insert_with(ChannelLiquidity::new) .as_directed_mut(&source, &target, capacity_msat) .successful(amount_msat); } -- 2.39.5