File tree 1 file changed +4
-14
lines changed
crates/forge/src/mutation 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -68,21 +68,11 @@ impl MutationHandler {
68
68
} ) ?;
69
69
70
70
let ast = parser. parse_file ( ) . map_err ( |e| e. emit ( ) ) ?;
71
+
72
+ let mut mutant_visitor = MutantVisitor { mutation_to_conduct : Vec :: new ( ) } ;
73
+ mutant_visitor. visit_source_unit ( & ast) ;
74
+ self . mutations . extend ( mutant_visitor. mutation_to_conduct ) ;
71
75
72
- for node in ast. items . iter ( ) {
73
- if let ItemKind :: Contract ( contract) = & node. kind {
74
- // @todo include library too?
75
- if matches ! (
76
- contract. kind,
77
- ContractKind :: Contract | ContractKind :: AbstractContract
78
- ) {
79
- let mut mutant_visitor = MutantVisitor { mutation_to_conduct : Vec :: new ( ) } ;
80
- mutant_visitor. visit_item_contract ( contract) ;
81
-
82
- self . mutations . extend ( mutant_visitor. mutation_to_conduct ) ;
83
- }
84
- }
85
- }
86
76
Ok ( ( ) )
87
77
} ) ;
88
78
}
You can’t perform that action at this time.
0 commit comments