From e69a4c2636ad2828377cf1df379e603c87989636 Mon Sep 17 00:00:00 2001 From: Valentine Wallace Date: Mon, 19 Dec 2022 15:27:29 -0500 Subject: [PATCH] Remove unnecessary mut in finalize_claims --- lightning/src/ln/outbound_payment.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lightning/src/ln/outbound_payment.rs b/lightning/src/ln/outbound_payment.rs index 68978c117..eacf46892 100644 --- a/lightning/src/ln/outbound_payment.rs +++ b/lightning/src/ln/outbound_payment.rs @@ -603,10 +603,10 @@ impl OutboundPayments { } } - pub(super) fn finalize_claims(&self, mut sources: Vec, pending_events: &Mutex>) { + pub(super) fn finalize_claims(&self, sources: Vec, pending_events: &Mutex>) { let mut outbounds = self.pending_outbound_payments.lock().unwrap(); let mut pending_events = pending_events.lock().unwrap(); - for source in sources.drain(..) { + for source in sources { if let HTLCSource::OutboundRoute { session_priv, payment_id, path, .. } = source { let mut session_priv_bytes = [0; 32]; session_priv_bytes.copy_from_slice(&session_priv[..]); -- 2.39.5