Add WithoutLength wrapper
authorJeffrey Czyz <jkczyz@gmail.com>
Fri, 7 Oct 2022 04:12:48 +0000 (23:12 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 4 Nov 2022 20:09:14 +0000 (15:09 -0500)
commit227fd51cb49adaca903972464166b73468d3a257
treeeca56c7b3dbad229c0cd0836d3b56caa01ed0a12
parent24b63de10c6b951263e7d262e739c55e01e650b3
Add WithoutLength wrapper

When serializing variable-length types as part of a TLV stream, the
length does not need to be serialized as it is already encoded in TLV
records. Add a WithoutLength wrapper for this encoding. Replace
VecReadWrapper and VecWriteWrapper with this single type to avoid
redundant encoders.
lightning/src/ln/channelmanager.rs
lightning/src/onion_message/packet.rs
lightning/src/util/events.rs
lightning/src/util/ser.rs
lightning/src/util/ser_macros.rs