@@ -32,9 +32,6 @@ macro_rules! _encode_tlv {
32
32
( $stream: expr, $type: expr, $field: expr, required_vec) => {
33
33
$crate:: _encode_tlv!( $stream, $type, $crate:: util:: ser:: WithoutLength ( & $field) , required) ;
34
34
} ;
35
- ( $stream: expr, $type: expr, $field: expr, vec_type) => {
36
- $crate:: _encode_tlv!( $stream, $type, $crate:: util:: ser:: WithoutLength ( & $field) , required) ;
37
- } ;
38
35
( $stream: expr, $optional_type: expr, $optional_field: expr, option) => {
39
36
if let Some ( ref field) = $optional_field {
40
37
BigSize ( $optional_type) . write( $stream) ?;
@@ -165,9 +162,6 @@ macro_rules! _get_varint_length_prefixed_tlv_length {
165
162
( $len: expr, $type: expr, $field: expr, required_vec) => {
166
163
$crate:: _get_varint_length_prefixed_tlv_length!( $len, $type, $crate:: util:: ser:: WithoutLength ( & $field) , required) ;
167
164
} ;
168
- ( $len: expr, $type: expr, $field: expr, vec_type) => {
169
- $crate:: _get_varint_length_prefixed_tlv_length!( $len, $type, $crate:: util:: ser:: WithoutLength ( & $field) , required) ;
170
- } ;
171
165
( $len: expr, $optional_type: expr, $optional_field: expr, option) => {
172
166
if let Some ( ref field) = $optional_field {
173
167
BigSize ( $optional_type) . write( & mut $len) . expect( "No in-memory data may fail to serialize" ) ;
@@ -245,9 +239,6 @@ macro_rules! _check_decoded_tlv_order {
245
239
( $last_seen_type: expr, $typ: expr, $type: expr, $field: ident, required_vec) => { {
246
240
$crate:: _check_decoded_tlv_order!( $last_seen_type, $typ, $type, $field, required) ;
247
241
} } ;
248
- ( $last_seen_type: expr, $typ: expr, $type: expr, $field: ident, vec_type) => { {
249
- // no-op
250
- } } ;
251
242
( $last_seen_type: expr, $typ: expr, $type: expr, $field: ident, optional_vec) => { {
252
243
// no-op
253
244
} } ;
@@ -293,9 +284,6 @@ macro_rules! _check_missing_tlv {
293
284
( $last_seen_type: expr, $type: expr, $field: ident, required_vec) => { {
294
285
$crate:: _check_missing_tlv!( $last_seen_type, $type, $field, required) ;
295
286
} } ;
296
- ( $last_seen_type: expr, $type: expr, $field: ident, vec_type) => { {
297
- // no-op
298
- } } ;
299
287
( $last_seen_type: expr, $type: expr, $field: ident, option) => { {
300
288
// no-op
301
289
} } ;
@@ -336,15 +324,12 @@ macro_rules! _decode_tlv {
336
324
let f: $crate:: util:: ser:: WithoutLength <Vec <_>> = $crate:: util:: ser:: Readable :: read( & mut $reader) ?;
337
325
$field = f. 0 ;
338
326
} } ;
339
- ( $reader: expr, $field: ident, vec_type) => { {
340
- let f: $crate:: util:: ser:: WithoutLength <Vec <_>> = $crate:: util:: ser:: Readable :: read( & mut $reader) ?;
341
- $field = Some ( f. 0 ) ;
342
- } } ;
343
327
( $reader: expr, $field: ident, option) => { {
344
328
$field = Some ( $crate:: util:: ser:: Readable :: read( & mut $reader) ?) ;
345
329
} } ;
346
330
( $reader: expr, $field: ident, optional_vec) => { {
347
- $crate:: _decode_tlv!( $reader, $field, vec_type) ;
331
+ let f: $crate:: util:: ser:: WithoutLength <Vec <_>> = $crate:: util:: ser:: Readable :: read( & mut $reader) ?;
332
+ $field = Some ( f. 0 ) ;
348
333
} } ;
349
334
// `upgradable_required` indicates we're reading a required TLV that may have been upgraded
350
335
// without backwards compat. We'll error if the field is missing, and return `Ok(None)` if the
@@ -713,9 +698,6 @@ macro_rules! _init_tlv_based_struct_field {
713
698
( $field: ident, required_vec) => {
714
699
$field
715
700
} ;
716
- ( $field: ident, vec_type) => {
717
- $field. unwrap( )
718
- } ;
719
701
( $field: ident, optional_vec) => {
720
702
$field. unwrap( )
721
703
} ;
@@ -742,9 +724,6 @@ macro_rules! _init_tlv_field_var {
742
724
( $field: ident, required_vec) => {
743
725
let mut $field = Vec :: new( ) ;
744
726
} ;
745
- ( $field: ident, vec_type) => {
746
- let mut $field = Some ( Vec :: new( ) ) ;
747
- } ;
748
727
( $field: ident, option) => {
749
728
let mut $field = None ;
750
729
} ;
0 commit comments