]> git.bitcoin.ninja Git - rust-lightning/commitdiff
Drop unnecessary clone 2022-11-dumb-lookup
authorMatt Corallo <git@bluematt.me>
Mon, 21 Nov 2022 23:27:44 +0000 (23:27 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 30 Nov 2022 05:48:37 +0000 (05:48 +0000)
lightning/src/ln/channelmanager.rs

index a672d01e803e3a2521a3ce87563307ab6f864d0e..d788356d63c23fe312452a6560e0597c69cf5e58 100644 (file)
@@ -3729,7 +3729,7 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F
                                                htlc.timer_ticks += 1;
                                                return htlc.timer_ticks >= MPP_TIMEOUT_TICKS
                                        }) {
-                                               timed_out_mpp_htlcs.extend(htlcs.into_iter().map(|htlc| (htlc.prev_hop.clone(), payment_hash.clone())));
+                                               timed_out_mpp_htlcs.extend(htlcs.drain(..).map(|htlc: ClaimableHTLC| (htlc.prev_hop, *payment_hash)));
                                                return false;
                                        }
                                }