Skip to content

Commit ff768b4

Browse files
committed
Auto merge of #12823 - calavera:fix_remove_help_typos, r=weihanglo
Clarify flag behavior in `cargo remove --help` ### What does this PR try to resolve? I noticed what I believe are typos in `cargo rm --help`: ``` Section: --dev Remove as development dependency --build Remove as build dependency --target <TARGET> Remove as dependency from the given target platform ``` This change updates that section with a more appropriate description of those flags. ### How should we test and review this PR? I've updated the relevant test for that help output. ### Additional information Sorry for not opening an issue about this. I believe it's easy enough to approve it if my assumption is correct.
2 parents 8eb8acb + 8849d25 commit ff768b4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/bin/cargo/commands/remove.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@ pub fn cli() -> clap::Command {
3434
.conflicts_with("build")
3535
.action(clap::ArgAction::SetTrue)
3636
.group("section")
37-
.help("Remove as development dependency"),
37+
.help("Remove from dev-dependencies"),
3838
clap::Arg::new("build")
3939
.long("build")
4040
.conflicts_with("dev")
4141
.action(clap::ArgAction::SetTrue)
4242
.group("section")
43-
.help("Remove as build dependency"),
43+
.help("Remove from build-dependencies"),
4444
clap::Arg::new("target")
4545
.long("target")
4646
.num_args(1)
4747
.value_name("TARGET")
4848
.value_parser(clap::builder::NonEmptyStringValueParser::new())
49-
.help("Remove as dependency from the given target platform"),
49+
.help("Remove from target-dependencies"),
5050
])
5151
.arg_package("Package to remove from")
5252
.arg_manifest_path()

tests/testsuite/cargo_remove/help/stdout.log

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ Options:
1515
-h, --help Print help
1616

1717
Section:
18-
--dev Remove as development dependency
19-
--build Remove as build dependency
20-
--target <TARGET> Remove as dependency from the given target platform
18+
--dev Remove from dev-dependencies
19+
--build Remove from build-dependencies
20+
--target <TARGET> Remove from target-dependencies
2121

2222
Package Selection:
2323
-p, --package [<SPEC>] Package to remove from

0 commit comments

Comments
 (0)