Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit c357eee

Browse files
authored
Merge pull request rust-lang#3276 from dten/allow-p
allow specifying package with -p
2 parents 996d5e8 + a8d2591 commit c357eee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cargo-fmt/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn execute() -> i32 {
5656
let mut is_package_arg = false;
5757
for arg in env::args().skip(2).take_while(|a| a != "--") {
5858
if arg.starts_with('-') {
59-
is_package_arg = arg.starts_with("--package");
59+
is_package_arg = arg.starts_with("--package") | arg.starts_with("-p");
6060
} else if !is_package_arg {
6161
print_usage_to_stderr(&opts, &format!("Invalid argument: `{}`.", arg));
6262
return FAILURE;

0 commit comments

Comments
 (0)