mirror of
https://github.com/rust-lang/cargo.git
synced 2025-10-01 11:30:39 +00:00
Use rename_all in TomlTarget serde derive
This commit is contained in:
parent
c26ed6357f
commit
ce9597c51b
@ -2862,12 +2862,12 @@ impl DetailedTomlDependency {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default, Serialize, Deserialize, Debug, Clone)]
|
#[derive(Default, Serialize, Deserialize, Debug, Clone)]
|
||||||
|
#[serde(rename_all = "kebab-case")]
|
||||||
struct TomlTarget {
|
struct TomlTarget {
|
||||||
name: Option<String>,
|
name: Option<String>,
|
||||||
|
|
||||||
// The intention was to only accept `crate-type` here but historical
|
// The intention was to only accept `crate-type` here but historical
|
||||||
// versions of Cargo also accepted `crate_type`, so look for both.
|
// versions of Cargo also accepted `crate_type`, so look for both.
|
||||||
#[serde(rename = "crate-type")]
|
|
||||||
crate_type: Option<Vec<String>>,
|
crate_type: Option<Vec<String>>,
|
||||||
#[serde(rename = "crate_type")]
|
#[serde(rename = "crate_type")]
|
||||||
crate_type2: Option<Vec<String>>,
|
crate_type2: Option<Vec<String>>,
|
||||||
@ -2880,14 +2880,12 @@ struct TomlTarget {
|
|||||||
bench: Option<bool>,
|
bench: Option<bool>,
|
||||||
doc: Option<bool>,
|
doc: Option<bool>,
|
||||||
plugin: Option<bool>,
|
plugin: Option<bool>,
|
||||||
#[serde(rename = "doc-scrape-examples")]
|
|
||||||
doc_scrape_examples: Option<bool>,
|
doc_scrape_examples: Option<bool>,
|
||||||
#[serde(rename = "proc-macro")]
|
#[serde(rename = "proc-macro")]
|
||||||
proc_macro_raw: Option<bool>,
|
proc_macro_raw: Option<bool>,
|
||||||
#[serde(rename = "proc_macro")]
|
#[serde(rename = "proc_macro")]
|
||||||
proc_macro_raw2: Option<bool>,
|
proc_macro_raw2: Option<bool>,
|
||||||
harness: Option<bool>,
|
harness: Option<bool>,
|
||||||
#[serde(rename = "required-features")]
|
|
||||||
required_features: Option<Vec<String>>,
|
required_features: Option<Vec<String>>,
|
||||||
edition: Option<String>,
|
edition: Option<String>,
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user