Skip to content

Commit 082a5de

Browse files
committed
f Use Default::default in struct init
1 parent 75f2238 commit 082a5de

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/payment/bolt11.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -468,11 +468,13 @@ impl Bolt11Payment {
468468
);
469469

470470
let invoice = {
471-
let mut invoice_params = Bolt11InvoiceParameters::default();
472-
invoice_params.amount_msats = amount_msat;
473-
invoice_params.description = invoice_description;
474-
invoice_params.invoice_expiry_delta_secs = Some(expiry_secs);
475-
invoice_params.payment_hash = manual_claim_payment_hash;
471+
let invoice_params = Bolt11InvoiceParameters {
472+
amount_msats: amount_msat,
473+
description: invoice_description,
474+
invoice_expiry_delta_secs: Some(expiry_secs),
475+
payment_hash: manual_claim_payment_hash,
476+
..Default::default()
477+
};
476478

477479
match self.channel_manager.create_bolt11_invoice(invoice_params) {
478480
Ok(inv) => {

0 commit comments

Comments
 (0)