File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ pub struct OptionsTemplate {
122
122
#[ nom(
123
123
PreExec = "let combined_count = scope_field_count as usize +
124
124
field_count.checked_sub(scope_field_count).unwrap_or(field_count) as usize;" ,
125
- Parse = "count(|i| TemplateField::parse(i, true), combined_count as usize )"
125
+ Parse = "count(|i| TemplateField::parse(i, true), combined_count)"
126
126
) ]
127
127
pub fields : Vec < TemplateField > ,
128
128
#[ nom( Cond = "!i.is_empty()" ) ]
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ pub struct OptionsData {
224
224
pub length : u16 ,
225
225
// Scope Data
226
226
#[ nom(
227
- Parse = "{ |i| parse_scope_data_fields(i, flow_set_id, parser.options_templates.clone() ) }"
227
+ Parse = "{ |i| parse_scope_data_fields(i, flow_set_id, & parser.options_templates) }"
228
228
) ]
229
229
pub scope_fields : Vec < ScopeDataField > ,
230
230
// Options Data Fields
@@ -464,11 +464,11 @@ fn parse_options_data_fields(
464
464
Ok ( ( remaining, fields) )
465
465
}
466
466
467
- fn parse_scope_data_fields (
468
- i : & [ u8 ] ,
467
+ fn parse_scope_data_fields < ' a > (
468
+ i : & ' a [ u8 ] ,
469
469
flow_set_id : u16 ,
470
- templates : HashMap < u16 , OptionsTemplate > ,
471
- ) -> IResult < & [ u8 ] , Vec < ScopeDataField > > {
470
+ templates : & HashMap < u16 , OptionsTemplate > ,
471
+ ) -> IResult < & ' a [ u8 ] , Vec < ScopeDataField > > {
472
472
let template = templates. get ( & flow_set_id) . ok_or_else ( || {
473
473
// dbg!("Could not fetch any v9 options templates!");
474
474
NomErr :: Error ( NomError :: new ( i, ErrorKind :: Fail ) )
You can’t perform that action at this time.
0 commit comments