From f3b2f23a1d95769082c97fc966d6eeddaea9668a Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Mon, 23 Aug 2021 18:37:02 +0800 Subject: refactor(cli/flags): use an optional non zero usize for `fail-fast` (#11804) Changes the type of the `fail_fast` flag from `Option` to `Option` as an optional value of zero isn't sound. --- cli/tools/test_runner.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/tools/test_runner.rs') diff --git a/cli/tools/test_runner.rs b/cli/tools/test_runner.rs index d2612e59d..a4bc99822 100644 --- a/cli/tools/test_runner.rs +++ b/cli/tools/test_runner.rs @@ -469,7 +469,7 @@ pub async fn run_tests( doc_modules: Vec, test_modules: Vec, no_run: bool, - fail_fast: Option, + fail_fast: Option, quiet: bool, allow_none: bool, filter: Option, @@ -621,7 +621,7 @@ pub async fn run_tests( } if let Some(x) = fail_fast { - if summary.failed >= x { + if summary.failed >= x.get() { break; } } -- cgit v1.2.3