Skip to content

Commit d57a982

Browse files
committed
Avoid ref to a Vec when accessing custom onion TLVs
The bindings can't easily return a reference to a `Vec`, so we instead simply return a slice.
1 parent 18f80d3 commit d57a982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/ln/outbound_payment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ impl RecipientOnionFields {
573573
/// Note that if this field is non-empty, it will contain strictly increasing TLVs, each
574574
/// represented by a `(u64, Vec<u8>)` for its type number and serialized value respectively.
575575
/// This is validated when setting this field using [`Self::with_custom_tlvs`].
576-
pub fn custom_tlvs(&self) -> &Vec<(u64, Vec<u8>)> {
576+
pub fn custom_tlvs(&self) -> &[(u64, Vec<u8>)] {
577577
&self.custom_tlvs
578578
}
579579

0 commit comments

Comments
 (0)