Worlds smallest optimization

Preallocate for 8 items in the vec. I chose this value for

1. features
2. description
3. payment hash
4. expire time
5. min_final_cltv
6. payment secret
7. route hint
8. for the memes
This commit is contained in:
benthecarman 2024-02-08 17:57:13 +00:00
parent c93b59e13d
commit 0769b22f5c
No known key found for this signature in database
GPG key ID: D7CC770B81FD22A8

View file

@ -550,7 +550,7 @@ impl InvoiceBuilder<tb::False, tb::False, tb::False, tb::False, tb::False, tb::F
amount: None,
si_prefix: None,
timestamp: None,
tagged_fields: Vec::new(),
tagged_fields: Vec::with_capacity(8),
error: None,
phantom_d: core::marker::PhantomData,