Skip to content

Commit ce9597c

Browse files
committed
Use rename_all in TomlTarget serde derive
1 parent c26ed63 commit ce9597c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/cargo/util/toml/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2862,12 +2862,12 @@ impl DetailedTomlDependency {
28622862
}
28632863

28642864
#[derive(Default, Serialize, Deserialize, Debug, Clone)]
2865+
#[serde(rename_all = "kebab-case")]
28652866
struct TomlTarget {
28662867
name: Option<String>,
28672868

28682869
// The intention was to only accept `crate-type` here but historical
28692870
// versions of Cargo also accepted `crate_type`, so look for both.
2870-
#[serde(rename = "crate-type")]
28712871
crate_type: Option<Vec<String>>,
28722872
#[serde(rename = "crate_type")]
28732873
crate_type2: Option<Vec<String>>,
@@ -2880,14 +2880,12 @@ struct TomlTarget {
28802880
bench: Option<bool>,
28812881
doc: Option<bool>,
28822882
plugin: Option<bool>,
2883-
#[serde(rename = "doc-scrape-examples")]
28842883
doc_scrape_examples: Option<bool>,
28852884
#[serde(rename = "proc-macro")]
28862885
proc_macro_raw: Option<bool>,
28872886
#[serde(rename = "proc_macro")]
28882887
proc_macro_raw2: Option<bool>,
28892888
harness: Option<bool>,
2890-
#[serde(rename = "required-features")]
28912889
required_features: Option<Vec<String>>,
28922890
edition: Option<String>,
28932891
}

0 commit comments

Comments
 (0)