@@ -161,6 +161,10 @@ impl FieldList {
161161 self . fields . len ( ) as u16
162162 }
163163
164+ pub fn is_empty ( & self ) -> bool {
165+ self . len ( ) == 0
166+ }
167+
164168 pub fn get ( self , index : u16 ) -> Field {
165169 Field {
166170 proto : self . fields . get ( index as u32 ) ,
@@ -174,13 +178,13 @@ impl FieldList {
174178 }
175179}
176180
177- impl < ' a > IndexMove < u16 , Field > for FieldList {
181+ impl IndexMove < u16 , Field > for FieldList {
178182 fn index_move ( & self , index : u16 ) -> Field {
179183 self . get ( index)
180184 }
181185}
182186
183- impl < ' a > :: core:: iter:: IntoIterator for FieldList {
187+ impl :: core:: iter:: IntoIterator for FieldList {
184188 type Item = Field ;
185189 type IntoIter = ShortListIter < FieldList , Self :: Item > ;
186190
@@ -220,13 +224,13 @@ impl FieldSubset {
220224 }
221225}
222226
223- impl < ' a > IndexMove < u16 , Field > for FieldSubset {
227+ impl IndexMove < u16 , Field > for FieldSubset {
224228 fn index_move ( & self , index : u16 ) -> Field {
225229 self . get ( index)
226230 }
227231}
228232
229- impl < ' a > :: core:: iter:: IntoIterator for FieldSubset {
233+ impl :: core:: iter:: IntoIterator for FieldSubset {
230234 type Item = Field ;
231235 type IntoIter = ShortListIter < FieldSubset , Self :: Item > ;
232236
@@ -341,13 +345,13 @@ impl EnumerantList {
341345 }
342346}
343347
344- impl < ' a > IndexMove < u16 , Enumerant > for EnumerantList {
348+ impl IndexMove < u16 , Enumerant > for EnumerantList {
345349 fn index_move ( & self , index : u16 ) -> Enumerant {
346350 self . get ( index)
347351 }
348352}
349353
350- impl < ' a > :: core:: iter:: IntoIterator for EnumerantList {
354+ impl :: core:: iter:: IntoIterator for EnumerantList {
351355 type Item = Enumerant ;
352356 type IntoIter = ShortListIter < Self , Self :: Item > ;
353357
@@ -414,13 +418,13 @@ impl AnnotationList {
414418 }
415419}
416420
417- impl < ' a > IndexMove < u32 , Annotation > for AnnotationList {
421+ impl IndexMove < u32 , Annotation > for AnnotationList {
418422 fn index_move ( & self , index : u32 ) -> Annotation {
419423 self . get ( index)
420424 }
421425}
422426
423- impl < ' a > :: core:: iter:: IntoIterator for AnnotationList {
427+ impl :: core:: iter:: IntoIterator for AnnotationList {
424428 type Item = Annotation ;
425429 type IntoIter = ListIter < Self , Self :: Item > ;
426430
0 commit comments