@@ -145,11 +145,11 @@ macro_rules! impl_writeable {
145145 }
146146}
147147macro_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 {
150150 fn write<W : Writer >( & self , w: & mut W ) -> Result <( ) , :: std:: io:: Error > {
151151 let len = match * self {
152- $( $m => $l , ) *
152+ $( $match => $length , ) *
153153 } ;
154154 w. size_hint( len) ;
155155 #[ cfg( any( test, feature = "fuzztarget" ) ) ]
@@ -165,16 +165,16 @@ macro_rules! impl_writeable_len_match {
165165 }
166166 }
167167
168- impl :: util:: ser:: Readable for $st {
168+ impl :: util:: ser:: Readable for $struct {
169169 fn read<R : :: std:: io:: Read >( r: & mut R ) -> Result <Self , DecodeError > {
170170 Ok ( Self {
171171 $( $field: Readable :: read( r) ?) ,*
172172 } )
173173 }
174174 }
175175 } ;
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) ,* } ) ;
178178 }
179179}
180180
0 commit comments