refactor(arg): rename arg_jobs to arg_parallel

This commit is contained in:
Weihang Lo 2023-08-18 10:50:40 +01:00
parent 5155d3f7dc
commit ba209d6abd
No known key found for this signature in database
GPG key ID: D7DBF189825E82E7
13 changed files with 15 additions and 15 deletions

View file

@ -42,7 +42,7 @@ pub fn cli() -> Command {
"Benchmark all targets",
)
.arg_features()
.arg_jobs_without_keep_going()
.arg_jobs()
.arg(flag("keep-going", "Use `--no-fail-fast` instead").hide(true)) // See rust-lang/cargo#11702
.arg_profile("Build artifacts with the specified profile")
.arg_target_triple("Build for the target triple")

View file

@ -31,7 +31,7 @@ pub fn cli() -> Command {
.arg_features()
.arg_release("Build artifacts in release mode, with optimizations")
.arg_profile("Build artifacts with the specified profile")
.arg_jobs()
.arg_parallel()
.arg_target_triple("Build for the target triple")
.arg_target_dir()
.arg(

View file

@ -29,7 +29,7 @@ pub fn cli() -> Command {
"Check all targets",
)
.arg_features()
.arg_jobs()
.arg_parallel()
.arg_release("Check artifacts in release mode, with optimizations")
.arg_profile("Check artifacts with the specified profile")
.arg_target_triple("Check for the target triple")

View file

@ -32,7 +32,7 @@ pub fn cli() -> Command {
"Document only the specified example",
"Document all examples",
)
.arg_jobs()
.arg_parallel()
.arg_release("Build artifacts in release mode, with optimizations")
.arg_profile("Build artifacts with the specified profile")
.arg_target_triple("Build for the target triple")

View file

@ -47,7 +47,7 @@ pub fn cli() -> Command {
"Fix all targets (default)",
)
.arg_features()
.arg_jobs()
.arg_parallel()
.arg_release("Fix artifacts in release mode, with optimizations")
.arg_profile("Build artifacts with the specified profile")
.arg_target_triple("Fix for the target triple")

View file

@ -75,7 +75,7 @@ pub fn cli() -> Command {
"Install all examples",
)
.arg_features()
.arg_jobs()
.arg_parallel()
.arg(flag(
"debug",
"Build in debug mode (with the 'dev' profile) instead of release mode",

View file

@ -33,7 +33,7 @@ pub fn cli() -> Command {
.arg_features()
.arg_target_triple("Build for the target triple")
.arg_target_dir()
.arg_jobs()
.arg_parallel()
.arg_manifest_path()
.after_help("Run `cargo help package` for more detailed information.\n")
}

View file

@ -20,7 +20,7 @@ pub fn cli() -> Command {
.arg_quiet()
.arg_package("Package to publish")
.arg_features()
.arg_jobs()
.arg_parallel()
.arg_target_triple("Build for the target triple")
.arg_target_dir()
.arg_manifest_path()

View file

@ -30,7 +30,7 @@ pub fn cli() -> Command {
"Name of the example target to run",
)
.arg_features()
.arg_jobs()
.arg_parallel()
.arg_release("Build artifacts in release mode, with optimizations")
.arg_profile("Build artifacts with the specified profile")
.arg_target_triple("Build for the target triple")

View file

@ -44,7 +44,7 @@ pub fn cli() -> Command {
"Build all targets",
)
.arg_features()
.arg_jobs()
.arg_parallel()
.arg_release("Build artifacts in release mode, with optimizations")
.arg_profile("Build artifacts with the specified profile")
.arg_target_triple("Target triple which compiles will be for")

View file

@ -32,7 +32,7 @@ pub fn cli() -> Command {
"Build all targets",
)
.arg_features()
.arg_jobs()
.arg_parallel()
.arg_release("Build artifacts in release mode, with optimizations")
.arg_profile("Build artifacts with the specified profile")
.arg_target_triple("Build for the target triple")

View file

@ -48,7 +48,7 @@ pub fn cli() -> Command {
"Test all targets (does not include doctests)",
)
.arg_features()
.arg_jobs_without_keep_going()
.arg_jobs()
.arg(flag("keep-going", "Use `--no-fail-fast` instead").hide(true)) // See rust-lang/cargo#11702
.arg_release("Build artifacts in release mode, with optimizations")
.arg_profile("Build artifacts with the specified profile")

View file

@ -82,8 +82,8 @@ pub trait CommandExt: Sized {
)
}
fn arg_jobs(self) -> Self {
self.arg_jobs_without_keep_going()._arg(
fn arg_parallel(self) -> Self {
self.arg_jobs()._arg(
flag(
"keep-going",
"Do not abort the build as soon as there is an error (unstable)",
@ -92,7 +92,7 @@ pub trait CommandExt: Sized {
)
}
fn arg_jobs_without_keep_going(self) -> Self {
fn arg_jobs(self) -> Self {
self._arg(
opt("jobs", "Number of parallel jobs, defaults to # of CPUs.")
.short('j')