From 6c8e19a3665ba1c6ed53d91fdd01fc8b52d6c5d9 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 17 Aug 2024 23:53:16 +0000 Subject: [PATCH] Avoid options holding references in the public API --- lightning/src/ln/channelmanager.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs index 2a16a3018..eccffa5d3 100644 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@ -4234,10 +4234,10 @@ where /// whether or not the payment was successful. /// /// [timer tick]: Self::timer_tick_occurred - pub fn send_payment_for_bolt12_invoice( - &self, invoice: &Bolt12Invoice, context: Option<&OffersContext>, + pub(crate) fn send_payment_for_bolt12_invoice( + &self, invoice: &Bolt12Invoice, context: Option, ) -> Result<(), Bolt12PaymentError> { - match self.verify_bolt12_invoice(invoice, context) { + match self.verify_bolt12_invoice(invoice, context.as_ref()) { Ok(payment_id) => self.send_payment_for_verified_bolt12_invoice(invoice, payment_id), Err(()) => Err(Bolt12PaymentError::UnexpectedInvoice), } -- 2.39.5