@@ -161,6 +161,10 @@ impl FieldList {
161
161
self . fields . len ( ) as u16
162
162
}
163
163
164
+ pub fn is_empty ( & self ) -> bool {
165
+ self . len ( ) == 0
166
+ }
167
+
164
168
pub fn get ( self , index : u16 ) -> Field {
165
169
Field {
166
170
proto : self . fields . get ( index as u32 ) ,
@@ -174,13 +178,13 @@ impl FieldList {
174
178
}
175
179
}
176
180
177
- impl < ' a > IndexMove < u16 , Field > for FieldList {
181
+ impl IndexMove < u16 , Field > for FieldList {
178
182
fn index_move ( & self , index : u16 ) -> Field {
179
183
self . get ( index)
180
184
}
181
185
}
182
186
183
- impl < ' a > :: core:: iter:: IntoIterator for FieldList {
187
+ impl :: core:: iter:: IntoIterator for FieldList {
184
188
type Item = Field ;
185
189
type IntoIter = ShortListIter < FieldList , Self :: Item > ;
186
190
@@ -220,13 +224,13 @@ impl FieldSubset {
220
224
}
221
225
}
222
226
223
- impl < ' a > IndexMove < u16 , Field > for FieldSubset {
227
+ impl IndexMove < u16 , Field > for FieldSubset {
224
228
fn index_move ( & self , index : u16 ) -> Field {
225
229
self . get ( index)
226
230
}
227
231
}
228
232
229
- impl < ' a > :: core:: iter:: IntoIterator for FieldSubset {
233
+ impl :: core:: iter:: IntoIterator for FieldSubset {
230
234
type Item = Field ;
231
235
type IntoIter = ShortListIter < FieldSubset , Self :: Item > ;
232
236
@@ -341,13 +345,13 @@ impl EnumerantList {
341
345
}
342
346
}
343
347
344
- impl < ' a > IndexMove < u16 , Enumerant > for EnumerantList {
348
+ impl IndexMove < u16 , Enumerant > for EnumerantList {
345
349
fn index_move ( & self , index : u16 ) -> Enumerant {
346
350
self . get ( index)
347
351
}
348
352
}
349
353
350
- impl < ' a > :: core:: iter:: IntoIterator for EnumerantList {
354
+ impl :: core:: iter:: IntoIterator for EnumerantList {
351
355
type Item = Enumerant ;
352
356
type IntoIter = ShortListIter < Self , Self :: Item > ;
353
357
@@ -414,13 +418,13 @@ impl AnnotationList {
414
418
}
415
419
}
416
420
417
- impl < ' a > IndexMove < u32 , Annotation > for AnnotationList {
421
+ impl IndexMove < u32 , Annotation > for AnnotationList {
418
422
fn index_move ( & self , index : u32 ) -> Annotation {
419
423
self . get ( index)
420
424
}
421
425
}
422
426
423
- impl < ' a > :: core:: iter:: IntoIterator for AnnotationList {
427
+ impl :: core:: iter:: IntoIterator for AnnotationList {
424
428
type Item = Annotation ;
425
429
type IntoIter = ListIter < Self , Self :: Item > ;
426
430
0 commit comments