refactor(toml): Group workspace inheritance logic

This commit is contained in:
Ed Page 2024-03-19 12:04:44 -05:00
parent e30ddc4f94
commit dd8f8dc645

View File

@ -519,18 +519,17 @@ pub fn to_real_manifest(
`[workspace]`, only one can be specified" `[workspace]`, only one can be specified"
), ),
}; };
let package_name = &package.name;
if package_name.contains(':') {
features.require(Feature::open_namespaces())?;
}
let inherit_cell: LazyCell<InheritableFields> = LazyCell::new(); let inherit_cell: LazyCell<InheritableFields> = LazyCell::new();
let inherit = || { let inherit = || {
inherit_cell inherit_cell
.try_borrow_with(|| load_inheritable_fields(gctx, manifest_file, &workspace_config)) .try_borrow_with(|| load_inheritable_fields(gctx, manifest_file, &workspace_config))
}; };
let package_name = &package.name;
if package_name.contains(':') {
features.require(Feature::open_namespaces())?;
}
let version = package let version = package
.version .version
.clone() .clone()