Commit a7c16a8
committed
ser: support LengthLimitedRead in impl_writeable_tlv_based_enum
When introducing the LengthLimitedRead trait in [1], for some
serialization macros we need some temporary workaround to
avoid that we have the following compilation error
error[E0277]: the trait bound `Bolt12Invoice: Readable` is not satisfied
--> lightning/src/util/ser_macros.rs:1243:35
|
1243 | Ok($st::$tuple_variant_name($crate::util::ser::Readable::read(reader)?))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Readable` is not implemented for `Bolt12Invoice`
|
::: lightning/src/events/mod.rs:2463:1
|
2463 | / impl_writeable_tlv_based_enum_legacy!(PaidInvoice,
2464 | | ;
2465 | | (0, Bolt12Invoice),
2466 | | (2, StaticInvoice)
2467 | | );
| |_- in this macro invocation
|
= help: the following other types implement trait `Readable`:
()
(A, B)
(A, B, C)
(A, B, C, D)
(A, B, C, D, E)
(A, B, C, D, E, F)
(A, B, C, D, E, F, G)
AnnouncementSigsState
and 200 others
= note: this error originates in the macro `impl_writeable_tlv_based_enum_legacy` (in Nightly builds, run with -Z macro-backtrace for more info)
This changes are needed since [1] is landed on mainline.
[1] lightningdevkit#3640
Co-Developed-by: @valentinewallace
Suggested-by: @valentinewallace
Signed-off-by: Vincenzo Palazzo <[email protected]>1 parent 4a0ba42 commit a7c16a8
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1225 | 1225 | | |
1226 | 1226 | | |
1227 | 1227 | | |
1228 | | - | |
| 1228 | + | |
1229 | 1229 | | |
1230 | 1230 | | |
1231 | 1231 | | |
| |||
0 commit comments