mirror of
https://github.com/rust-lang/cargo
synced 2024-10-13 19:22:33 +00:00
fix(add): Preserve formatting
This commit is contained in:
parent
6d8f35f729
commit
dbf9134d57
|
@ -516,7 +516,9 @@ fn fix_feature_activations(
|
||||||
} = parsed_value
|
} = parsed_value
|
||||||
{
|
{
|
||||||
if dep_name == dep_key && weak {
|
if dep_name == dep_key && weak {
|
||||||
*value = format!("{dep_name}/{dep_feature}").into();
|
let mut new_value = toml_edit::Value::from(format!("{dep_name}/{dep_feature}"));
|
||||||
|
*new_value.decor_mut() = value.decor().clone();
|
||||||
|
*value = new_value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,8 @@ default = [
|
||||||
"b",
|
"b",
|
||||||
"c",
|
"c",
|
||||||
]
|
]
|
||||||
a = ["your-face/nose", # but not the mouth and nose
|
a = [
|
||||||
|
"your-face/nose", # but not the mouth and nose
|
||||||
]
|
]
|
||||||
b = []
|
b = []
|
||||||
c = []
|
c = []
|
||||||
|
|
Loading…
Reference in a new issue