Skip to content

Commit acf90ad

Browse files
committed
f - use with_capacity
1 parent 6455949 commit acf90ad

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lightning/src/offers/invoice.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ impl UnsignedBolt12Invoice {
503503
let mut bytes = Vec::with_capacity(
504504
invreq_bytes.len()
505505
+ invoice_tlv_stream.serialized_length()
506+
+ experimental_invoice_tlv_stream.serialized_length()
506507
);
507508

508509
// Use the invoice_request bytes instead of the invoice_request TLV stream as the latter may
@@ -520,6 +521,7 @@ impl UnsignedBolt12Invoice {
520521
.range(SIGNATURE_TYPES)
521522
.last()
522523
.map_or(0, |last_record| last_record.end)
524+
+ experimental_invoice_tlv_stream.serialized_length()
523525
);
524526

525527
for record in TlvStream::new(invreq_bytes).range(EXPERIMENTAL_TYPES) {

0 commit comments

Comments
 (0)