diff --git a/src/console.rs b/src/console.rs index 25ab035c..7e62917d 100644 --- a/src/console.rs +++ b/src/console.rs @@ -114,6 +114,14 @@ impl Console { )); } + /// Update that we discovered some mutants to test. + pub fn discovered_mutants(&self, mutants: &[Mutant]) { + self.message(&format!( + "Found {} to test\n", + plural(mutants.len(), "mutant") + )); + } + /// Update that work is starting on testing a given number of mutants. pub fn start_testing_mutants(&self, n_mutants: usize) { self.view.update(|model| { diff --git a/src/lab.rs b/src/lab.rs index 98b41d8f..a2a17642 100644 --- a/src/lab.rs +++ b/src/lab.rs @@ -13,7 +13,7 @@ use tracing::error; use tracing::{debug, info}; use crate::cargo::{cargo_argv, run_cargo, CargoSourceTree}; -use crate::console::{plural, Console}; +use crate::console::Console; use crate::outcome::{LabOutcome, Phase, ScenarioOutcome}; use crate::output::OutputDir; use crate::*; @@ -42,10 +42,7 @@ pub fn test_unmutated_then_all_mutants( mutants.shuffle(&mut rand::thread_rng()); } output_dir.write_mutants_list(&mutants)?; - console.message(&format!( - "Found {} to test\n", - plural(mutants.len(), "mutant") - )); + console.discovered_mutants(&mutants); if mutants.is_empty() { return Err(anyhow!("No mutants found")); }