From: Jeffrey Czyz Date: Fri, 28 Jan 2022 14:44:17 +0000 (-0600) Subject: f - Remove redundant closure X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=955302b5229003fbe21c1cea5b2ef5cfa9a67639;p=rust-lightning f - Remove redundant closure --- 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); }