Skip to content

Commit c34d166

Browse files
committed
Avoid options holding references in the public API
1 parent f1a52eb commit c34d166

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4725,9 +4725,9 @@ where
47254725
///
47264726
/// [timer tick]: Self::timer_tick_occurred
47274727
pub fn send_payment_for_bolt12_invoice(
4728-
&self, invoice: &Bolt12Invoice, context: Option<&OffersContext>,
4728+
&self, invoice: &Bolt12Invoice, context: Option<OffersContext>,
47294729
) -> Result<(), Bolt12PaymentError> {
4730-
match self.verify_bolt12_invoice(invoice, context) {
4730+
match self.verify_bolt12_invoice(invoice, context.as_ref()) {
47314731
Ok(payment_id) => self.send_payment_for_verified_bolt12_invoice(invoice, payment_id),
47324732
Err(()) => Err(Bolt12PaymentError::UnexpectedInvoice),
47334733
}

0 commit comments

Comments
 (0)