@@ -145,11 +145,11 @@ macro_rules! impl_writeable {
145
145
}
146
146
}
147
147
macro_rules! impl_writeable_len_match {
148
- ( $st : ident, $cmp: tt, { $( { $m : pat, $l : expr} ) ,* } , { $( $field: ident) ,* } ) => {
149
- impl Writeable for $st {
148
+ ( $struct : ident, $cmp: tt, { $( { $match : pat, $length : expr} ) ,* } , { $( $field: ident) ,* } ) => {
149
+ impl Writeable for $struct {
150
150
fn write<W : Writer >( & self , w: & mut W ) -> Result <( ) , :: std:: io:: Error > {
151
151
let len = match * self {
152
- $( $m => $l , ) *
152
+ $( $match => $length , ) *
153
153
} ;
154
154
w. size_hint( len) ;
155
155
#[ cfg( any( test, feature = "fuzztarget" ) ) ]
@@ -165,16 +165,16 @@ macro_rules! impl_writeable_len_match {
165
165
}
166
166
}
167
167
168
- impl :: util:: ser:: Readable for $st {
168
+ impl :: util:: ser:: Readable for $struct {
169
169
fn read<R : :: std:: io:: Read >( r: & mut R ) -> Result <Self , DecodeError > {
170
170
Ok ( Self {
171
171
$( $field: Readable :: read( r) ?) ,*
172
172
} )
173
173
}
174
174
}
175
175
} ;
176
- ( $st : ident, { $( { $m : pat, $l : expr} ) ,* } , { $( $field: ident) ,* } ) => {
177
- impl_writeable_len_match!( $st , ==, { $( { $m , $l } ) ,* } , { $( $field) ,* } ) ;
176
+ ( $struct : ident, { $( { $match : pat, $length : expr} ) ,* } , { $( $field: ident) ,* } ) => {
177
+ impl_writeable_len_match!( $struct , ==, { $( { $match , $length } ) ,* } , { $( $field) ,* } ) ;
178
178
}
179
179
}
180
180
0 commit comments