Skip to content

Commit 46aaad2

Browse files
committed
f simplify since we're touching
1 parent 41943a0 commit 46aaad2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6929,10 +6929,8 @@ where
69296929
payment_info: Option<PaymentClaimDetails>, completion_action: ComplFunc,
69306930
) {
69316931
let counterparty_node_id = prev_hop.counterparty_node_id.or_else(|| {
6932-
match self.short_to_chan_info.read().unwrap().get(&prev_hop.short_channel_id) {
6933-
Some((cp_id, _dup_chan_id)) => Some(cp_id.clone()),
6934-
None => None
6935-
}
6932+
let short_to_chan_info = self.short_to_chan_info.read().unwrap();
6933+
short_to_chan_info.get(&prev_hop.short_channel_id).map(|(cp_id, _)| *cp_id)
69366934
});
69376935

69386936
let htlc_source = HTLCClaimSource {

0 commit comments

Comments
 (0)