Skip to content

Commit d3bff4e

Browse files
committed
refactor(toml): Re-arrange tables due to toml upgrade
In switching from toml v0.5 to toml_edit, we no longer need to have tables after all fields.
1 parent f2a6514 commit d3bff4e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/cargo/util/toml/mod.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,15 +1536,12 @@ pub struct TomlWorkspace {
15361536
default_members: Option<Vec<String>>,
15371537
exclude: Option<Vec<String>>,
15381538
resolver: Option<String>,
1539+
metadata: Option<toml::Value>,
15391540

15401541
// Properties that can be inherited by members.
15411542
package: Option<InheritableFields>,
15421543
dependencies: Option<BTreeMap<String, TomlDependency>>,
15431544
lints: Option<TomlLints>,
1544-
1545-
// Note that this field must come last due to the way toml serialization
1546-
// works which requires tables to be emitted after all values.
1547-
metadata: Option<toml::Value>,
15481545
}
15491546

15501547
/// A group of fields that are inheritable by members of the workspace
@@ -1710,13 +1707,11 @@ pub struct TomlPackage {
17101707
repository: Option<MaybeWorkspaceString>,
17111708
resolver: Option<String>,
17121709

1710+
metadata: Option<toml::Value>,
1711+
17131712
// Provide a helpful error message for a common user error.
17141713
#[serde(rename = "cargo-features", skip_serializing)]
17151714
_invalid_cargo_features: Option<InvalidCargoFeatures>,
1716-
1717-
// Note that this field must come last due to the way toml serialization
1718-
// works which requires tables to be emitted after all values.
1719-
metadata: Option<toml::Value>,
17201715
}
17211716

17221717
impl TomlPackage {

0 commit comments

Comments
 (0)