fix(add): Preserve formatting

This commit is contained in:
Ed Page 2023-05-26 16:23:58 -05:00
parent 6d8f35f729
commit dbf9134d57
2 changed files with 5 additions and 2 deletions

View file

@ -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;
} }
} }
} }

View file

@ -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 = []