Skip to content

Commit 65a4b35

Browse files
committed
f comments
1 parent 57f093c commit 65a4b35

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lightning/src/util/ser_macros.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,9 @@ macro_rules! _impl_writeable_tlv_based_enum_common {
997997
($st: ident, $(($variant_id: expr, $variant_name: ident) =>
998998
{$(($type: expr, $field: ident, $fieldty: tt)),* $(,)*}
999999
),* $(,)?;
1000+
// $tuple_variant_* are only passed from `impl_writeable_tlv_based_enum_*_legacy`
10001001
$(($tuple_variant_id: expr, $tuple_variant_name: ident)),* $(,)?;
1002+
// $length_prefixed_* are only passed from `impl_writeable_tlv_based_enum_*` non-`legacy`
10011003
$(($length_prefixed_tuple_variant_id: expr, $length_prefixed_tuple_variant_name: ident)),* $(,)?) => {
10021004
impl $crate::util::ser::Writeable for $st {
10031005
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 {
10491051
/// impl_writeable_tlv_based_enum!(EnumName,
10501052
/// (0, StructVariantA) => {(0, required_variant_field, required), (1, optional_variant_field, option)},
10511053
/// (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
10531055
/// {3, TupleVariantB} => (),
10541056
/// );
10551057
/// ```

0 commit comments

Comments
 (0)