@@ -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,15 +137,13 @@ 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
} ;
@@ -159,20 +154,17 @@ pub fn main() {
159
154
// For now, due to a limitation in lifetime management (see the MappedInput trait),
160
155
// the types have to be partially specified
161
156
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) ) ;
157
+ . merge ( havoc_crossover_with_corpus_mapper ( CustomInput :: byte_array) )
158
+ . map ( ToMappedInputFunctionMappingMutatorMapper :: new (
159
+ CustomInput :: byte_array_mut,
160
+ ) ) ;
169
161
170
162
// Creating mutators that will operate on input.optional_byte_array
171
163
// For now, due to a limitation in lifetime management (see the MappedInput trait),
172
164
// the types have to be partially specified
173
165
let optional_mapped_mutators = havoc_mutations_no_crossover ( )
174
166
. merge ( havoc_crossover_with_corpus_mapper (
175
- & CustomInput :: optional_byte_array_optional ,
167
+ CustomInput :: optional_byte_array ,
176
168
) )
177
169
. map ( ToOptionMappingMutatorMapper )
178
170
. map ( ToMappedInputFunctionMappingMutatorMapper :: new (
0 commit comments