@@ -997,7 +997,9 @@ macro_rules! _impl_writeable_tlv_based_enum_common {
997
997
( $st: ident, $( ( $variant_id: expr, $variant_name: ident) =>
998
998
{ $( ( $type: expr, $field: ident, $fieldty: tt) ) ,* $( , ) * }
999
999
) ,* $( , ) ?;
1000
+ // $tuple_variant_* are only passed from `impl_writeable_tlv_based_enum_*_legacy`
1000
1001
$( ( $tuple_variant_id: expr, $tuple_variant_name: ident) ) ,* $( , ) ?;
1002
+ // $length_prefixed_* are only passed from `impl_writeable_tlv_based_enum_*` non-`legacy`
1001
1003
$( ( $length_prefixed_tuple_variant_id: expr, $length_prefixed_tuple_variant_name: ident) ) ,* $( , ) ?) => {
1002
1004
impl $crate:: util:: ser:: Writeable for $st {
1003
1005
fn write<W : $crate:: util:: ser:: Writer >( & self , writer: & mut W ) -> Result <( ) , $crate:: io:: Error > {
@@ -1049,7 +1051,7 @@ macro_rules! _impl_writeable_tlv_based_enum_common {
1049
1051
/// impl_writeable_tlv_based_enum!(EnumName,
1050
1052
/// (0, StructVariantA) => {(0, required_variant_field, required), (1, optional_variant_field, option)},
1051
1053
/// (1, StructVariantB) => {(0, variant_field_a, required), (1, variant_field_b, required), (2, variant_vec_field, optional_vec)},
1052
- /// (2, TupleVariantA) => {}, // Note that empty tuple varaints have to use the struct syntax due to rust limitations
1054
+ /// (2, TupleVariantA) => {}, // Note that empty tuple variants have to use the struct syntax due to rust limitations
1053
1055
/// {3, TupleVariantB} => (),
1054
1056
/// );
1055
1057
/// ```
0 commit comments