@@ -281,6 +281,9 @@ macro_rules! _check_decoded_tlv_order {
281281 ( $last_seen_type: expr, $typ: expr, $type: expr, $field: ident, option) => { {
282282 // no-op
283283 } } ;
284+ ( $last_seen_type: expr, $typ: expr, $type: expr, $field: ident, option_unit) => { {
285+ // no-op
286+ } } ;
284287 ( $last_seen_type: expr, $typ: expr, $type: expr, $field: ident, required_vec) => { {
285288 $crate:: _check_decoded_tlv_order!( $last_seen_type, $typ, $type, $field, required) ;
286289 } } ;
@@ -332,6 +335,9 @@ macro_rules! _check_missing_tlv {
332335 ( $last_seen_type: expr, $type: expr, $field: ident, option) => { {
333336 // no-op
334337 } } ;
338+ ( $last_seen_type: expr, $type: expr, $field: ident, option_unit) => { {
339+ // no-op
340+ } } ;
335341 ( $last_seen_type: expr, $type: expr, $field: ident, optional_vec) => { {
336342 // no-op
337343 } } ;
@@ -372,6 +378,9 @@ macro_rules! _decode_tlv {
372378 ( $outer_reader: expr, $reader: expr, $field: ident, option) => { {
373379 $field = Some ( $crate:: util:: ser:: Readable :: read( & mut $reader) ?) ;
374380 } } ;
381+ ( $outer_reader: expr, $reader: expr, $field: ident, option_unit) => { {
382+ $field = Some ( $crate:: util:: ser:: Readable :: read( & mut $reader) ?) ;
383+ } } ;
375384 ( $outer_reader: expr, $reader: expr, $field: ident, optional_vec) => { {
376385 let f: $crate:: util:: ser:: WithoutLength <Vec <_>> = $crate:: util:: ser:: Readable :: read( & mut $reader) ?;
377386 $field = Some ( f. 0 ) ;
@@ -792,6 +801,9 @@ macro_rules! _init_tlv_field_var {
792801 ( $field: ident, option) => {
793802 let mut $field = None ;
794803 } ;
804+ ( $field: ident, option_unit) => {
805+ let mut $field: Option <( ) > = None ;
806+ } ;
795807 ( $field: ident, optional_vec) => {
796808 let mut $field = Some ( Vec :: new( ) ) ;
797809 } ;
0 commit comments