@@ -29,12 +29,9 @@ use libafl_bolts::{
29
29
} ;
30
30
#[ cfg( not( feature = "simple_interface" ) ) ]
31
31
use {
32
- libafl:: {
33
- inputs:: MutVecInput ,
34
- mutators:: {
35
- havoc_mutations:: { havoc_crossover_with_corpus_mapper, havoc_mutations_no_crossover} ,
36
- mapping:: { ToMappedInputFunctionMappingMutatorMapper , ToOptionMappingMutatorMapper } ,
37
- } ,
32
+ libafl:: mutators:: {
33
+ havoc_mutations:: { havoc_crossover_with_corpus_mapper, havoc_mutations_no_crossover} ,
34
+ mapping:: { ToMappedInputFunctionMappingMutatorMapper , ToOptionMappingMutatorMapper } ,
38
35
} ,
39
36
libafl_bolts:: tuples:: Map ,
40
37
} ;
@@ -140,39 +137,30 @@ pub fn main() {
140
137
#[ cfg( feature = "simple_interface" ) ]
141
138
let ( mapped_mutators, optional_mapped_mutators) = {
142
139
// Creating mutators that will operate on input.byte_array
143
- let mapped_mutators = mapped_havoc_mutations (
144
- CustomInput :: byte_array_mut,
145
- CustomInput :: byte_array_optional,
146
- ) ;
140
+ let mapped_mutators =
141
+ mapped_havoc_mutations ( CustomInput :: byte_array_mut, CustomInput :: byte_array) ;
147
142
148
143
// Creating mutators that will operate on input.optional_byte_array
149
144
let optional_mapped_mutators = optional_mapped_havoc_mutations (
150
145
CustomInput :: optional_byte_array_mut,
151
- CustomInput :: optional_byte_array_optional ,
146
+ CustomInput :: optional_byte_array ,
152
147
) ;
153
148
( mapped_mutators, optional_mapped_mutators)
154
149
} ;
155
150
156
151
#[ cfg( not( feature = "simple_interface" ) ) ]
157
152
let ( mapped_mutators, optional_mapped_mutators) = {
158
153
// Creating mutators that will operate on input.byte_array
159
- // For now, due to a limitation in lifetime management (see the MappedInput trait),
160
- // the types have to be partially specified
161
154
let mapped_mutators = havoc_mutations_no_crossover ( )
162
- . merge ( havoc_crossover_with_corpus_mapper (
163
- & CustomInput :: byte_array_optional,
164
- ) )
165
- . map ( ToMappedInputFunctionMappingMutatorMapper :: <
166
- _ ,
167
- MutVecInput < ' _ > ,
168
- > :: new ( CustomInput :: byte_array_mut) ) ;
155
+ . merge ( havoc_crossover_with_corpus_mapper ( CustomInput :: byte_array) )
156
+ . map ( ToMappedInputFunctionMappingMutatorMapper :: new (
157
+ CustomInput :: byte_array_mut,
158
+ ) ) ;
169
159
170
160
// Creating mutators that will operate on input.optional_byte_array
171
- // For now, due to a limitation in lifetime management (see the MappedInput trait),
172
- // the types have to be partially specified
173
161
let optional_mapped_mutators = havoc_mutations_no_crossover ( )
174
162
. merge ( havoc_crossover_with_corpus_mapper (
175
- & CustomInput :: optional_byte_array_optional ,
163
+ CustomInput :: optional_byte_array ,
176
164
) )
177
165
. map ( ToOptionMappingMutatorMapper )
178
166
. map ( ToMappedInputFunctionMappingMutatorMapper :: new (
0 commit comments