mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Make the public/no-public
next to the pair optional/no-optional
This commit is contained in:
parent
58e0ab825b
commit
509535675b
@ -62,6 +62,17 @@ The package name will be exposed as feature of your crate.")
|
||||
The package will be removed from your features.")
|
||||
.conflicts_with("dev")
|
||||
.overrides_with("optional"),
|
||||
flag("public", "Mark the dependency as public")
|
||||
.long_help("Mark the dependency as public
|
||||
|
||||
The dependnecy will be visible in both of your crate and outside."),
|
||||
flag("no-public", "Mark the dependency as private")
|
||||
.conflicts_with("dev")
|
||||
.conflicts_with("build")
|
||||
.overrides_with("public")
|
||||
.long_help("Mark the dependency as private
|
||||
|
||||
The dependnecy will be only visible in your crate other than outside."),
|
||||
clap::Arg::new("rename")
|
||||
.long("rename")
|
||||
.action(ArgAction::Set)
|
||||
@ -76,18 +87,6 @@ Example uses:
|
||||
"ignore-rust-version",
|
||||
"Ignore `rust-version` specification in packages (unstable)"
|
||||
),
|
||||
flag("public", "Mark the dependency as public")
|
||||
.long_help("Mark the dependency as public
|
||||
|
||||
The dependnecy will be visible in both of your crate and outside."),
|
||||
flag("no-public", "Mark the dependency as private")
|
||||
.conflicts_with("dev")
|
||||
.long_help("Mark the dependency as private
|
||||
|
||||
The dependnecy will be only visible in your crate other than outside.")
|
||||
.conflicts_with("dev")
|
||||
.overrides_with("public"),
|
||||
|
||||
])
|
||||
.arg_manifest_path_without_unsupported_path_tip()
|
||||
.arg_package("Package to modify")
|
||||
|
@ -51,13 +51,13 @@ impl Dependency {
|
||||
Self {
|
||||
name: name.into(),
|
||||
optional: None,
|
||||
public: None,
|
||||
features: None,
|
||||
default_features: None,
|
||||
inherited_features: None,
|
||||
source: None,
|
||||
registry: None,
|
||||
rename: None,
|
||||
public: None,
|
||||
}
|
||||
}
|
||||
|
||||
@ -338,14 +338,14 @@ impl Dependency {
|
||||
|
||||
let dep = Self {
|
||||
name,
|
||||
rename,
|
||||
source: Some(source),
|
||||
registry,
|
||||
default_features,
|
||||
features,
|
||||
optional,
|
||||
public,
|
||||
features,
|
||||
default_features,
|
||||
inherited_features: None,
|
||||
source: Some(source),
|
||||
registry,
|
||||
rename,
|
||||
};
|
||||
Ok(dep)
|
||||
} else {
|
||||
|
@ -32,16 +32,6 @@ Options:
|
||||
|
||||
The package will be removed from your features.
|
||||
|
||||
--rename <NAME>
|
||||
Rename the dependency
|
||||
|
||||
Example uses:
|
||||
- Depending on multiple versions of a crate
|
||||
- Depend on crates with the same name from different registries
|
||||
|
||||
--ignore-rust-version
|
||||
Ignore `rust-version` specification in packages (unstable)
|
||||
|
||||
--public
|
||||
Mark the dependency as public
|
||||
|
||||
@ -52,6 +42,16 @@ Options:
|
||||
|
||||
The dependnecy will be only visible in your crate other than outside.
|
||||
|
||||
--rename <NAME>
|
||||
Rename the dependency
|
||||
|
||||
Example uses:
|
||||
- Depending on multiple versions of a crate
|
||||
- Depend on crates with the same name from different registries
|
||||
|
||||
--ignore-rust-version
|
||||
Ignore `rust-version` specification in packages (unstable)
|
||||
|
||||
-n, --dry-run
|
||||
Don't actually write the manifest
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user