Skip to content

Commit a866976

Browse files
committed
Move cargo new/init --registry option to arg_new_opts
1 parent 25bf8cc commit a866976

File tree

3 files changed

+1
-2
lines changed

3 files changed

+1
-2
lines changed

src/bin/cargo/commands/init.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pub fn cli() -> App {
66
subcommand("init")
77
.about("Create a new cargo package in an existing directory")
88
.arg(Arg::with_name("path").default_value("."))
9-
.arg(opt("registry", "Registry to use").value_name("REGISTRY"))
109
.arg_new_opts()
1110
}
1211

src/bin/cargo/commands/new.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pub fn cli() -> App {
66
subcommand("new")
77
.about("Create a new cargo package at <path>")
88
.arg(Arg::with_name("path").required(true))
9-
.arg(opt("registry", "Registry to use").value_name("REGISTRY"))
109
.arg_new_opts()
1110
}
1211

src/cargo/util/command_prelude.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ pub trait AppExt: Sized {
171171
)
172172
.value_name("NAME"),
173173
)
174+
._arg(opt("registry", "Registry to use").value_name("REGISTRY"))
174175
}
175176

176177
fn arg_index(self) -> Self {

0 commit comments

Comments
 (0)