mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 07:01:16 +00:00
refactor(cli/flags): use an optional non zero usize for fail-fast
(#11804)
Changes the type of the `fail_fast` flag from `Option<usize>` to `Option<NonZeroUsize>` as an optional value of zero isn't sound.
This commit is contained in:
parent
198699faba
commit
f3b2f23a1d
3 changed files with 13 additions and 16 deletions
|
@ -469,7 +469,7 @@ pub async fn run_tests(
|
|||
doc_modules: Vec<ModuleSpecifier>,
|
||||
test_modules: Vec<ModuleSpecifier>,
|
||||
no_run: bool,
|
||||
fail_fast: Option<usize>,
|
||||
fail_fast: Option<NonZeroUsize>,
|
||||
quiet: bool,
|
||||
allow_none: bool,
|
||||
filter: Option<String>,
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue