summaryrefslogtreecommitdiff
path: root/cli/main.rs
diff options
context:
space:
mode:
authorCasper Beyer <caspervonb@pm.me>2021-08-23 18:37:02 +0800
committerGitHub <noreply@github.com>2021-08-23 12:37:02 +0200
commitf3b2f23a1d95769082c97fc966d6eeddaea9668a (patch)
treeb83e8989fb18f8d774e97727902d606263cafdfc /cli/main.rs
parent198699fabae37fb3f1edd6aa058ea050cc43bb19 (diff)
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.
Diffstat (limited to 'cli/main.rs')
-rw-r--r--cli/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/main.rs b/cli/main.rs
index 0c758e631..45afd0329 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -77,6 +77,7 @@ use std::env;
use std::io::Read;
use std::io::Write;
use std::iter::once;
+use std::num::NonZeroUsize;
use std::path::PathBuf;
use std::pin::Pin;
use std::rc::Rc;
@@ -1004,7 +1005,7 @@ async fn test_command(
include: Option<Vec<String>>,
no_run: bool,
doc: bool,
- fail_fast: Option<usize>,
+ fail_fast: Option<NonZeroUsize>,
quiet: bool,
allow_none: bool,
filter: Option<String>,