@@ -51,7 +51,7 @@ use crate::path::Utf8PathSlashes;
5151use crate :: scenario:: Scenario ;
5252use crate :: source:: SourceFile ;
5353use crate :: tool:: Tool ;
54- use crate :: visit:: { discover_files , discover_mutants } ;
54+ use crate :: visit:: walk_tree ;
5555
5656const VERSION : & str = env ! ( "CARGO_PKG_VERSION" ) ;
5757const NAME : & str = env ! ( "CARGO_PKG_NAME" ) ;
@@ -217,15 +217,15 @@ fn main() -> Result<()> {
217217 if args. list_files {
218218 list_files ( & tool, & source_tree_root, & options, args. json ) ?;
219219 } else if args. list {
220- let mutants = discover_mutants ( & tool, & source_tree_root, & options) ?;
220+ let discovered = walk_tree ( & tool, & source_tree_root, & options) ?;
221221 if args. json {
222222 if args. diff {
223223 eprintln ! ( "--list --diff --json is not (yet) supported" ) ;
224224 exit ( exit_code:: USAGE ) ;
225225 }
226- serde_json:: to_writer_pretty ( io:: BufWriter :: new ( io:: stdout ( ) ) , & mutants) ?;
226+ serde_json:: to_writer_pretty ( io:: BufWriter :: new ( io:: stdout ( ) ) , & discovered . mutants ) ?;
227227 } else {
228- console:: list_mutants ( & mutants, args. diff ) ;
228+ console:: list_mutants ( & discovered . mutants , args. diff ) ;
229229 }
230230 } else {
231231 let lab_outcome =
@@ -236,11 +236,12 @@ fn main() -> Result<()> {
236236}
237237
238238fn list_files ( tool : & dyn Tool , source : & Utf8Path , options : & Options , json : bool ) -> Result < ( ) > {
239- let files = discover_files ( tool, source, options) ?;
239+ let discovered = walk_tree ( tool, source, options) ?;
240240 let mut out = io:: BufWriter :: new ( io:: stdout ( ) ) ;
241241 if json {
242242 let json_list = Value :: Array (
243- files
243+ discovered
244+ . files
244245 . iter ( )
245246 . map ( |source_file| {
246247 json ! ( {
@@ -253,7 +254,7 @@ fn list_files(tool: &dyn Tool, source: &Utf8Path, options: &Options, json: bool)
253254 ) ;
254255 serde_json:: to_writer_pretty ( out, & json_list) ?;
255256 } else {
256- for file in files {
257+ for file in discovered . files {
257258 writeln ! ( out, "{}" , file. tree_relative_path) ?;
258259 }
259260 }
0 commit comments