Skip to content

Commit

Permalink
fix(remove): Leave formatting to the user
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Oct 17, 2023
1 parent a96bc9f commit 767b3d6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/cargo/util/toml_mut/manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,6 @@ fn fix_feature_activations(
for idx in remove_list.iter().rev() {
feature_values.remove(*idx);
}
if !remove_list.is_empty() {
// HACK: Instead of cleaning up the users formatting from having removed a feature, we just
// re-format the whole feature list
feature_values.fmt();
}

if status == DependencyStatus::Required {
for value in feature_values.iter_mut() {
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_remove/multiple_dev/out/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ toml = "0.1"
clippy = "0.4"

[features]
std = ["semver/std"]
std = [ "semver/std"]
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ clippy = "0.4"
regex = "0.1.1"

[features]
std = ["semver/std"]
std = [ "semver/std"]
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,16 @@ regex = "0.1.1"
serde = "1.0.90"

[features]
std = ["dep:clippy", "dep:rustc-serialize", "serde/std", "semver/std"]
std = [
# Leading clippy
"dep:clippy", # trailing docopt

# Leading rustc-serialize
"dep:rustc-serialize", # trailing rustc-serialize

# Leading serde/std
"serde/std", # trailing serde/std

# Leading semver/std
"semver/std", # trailing toml
]

0 comments on commit 767b3d6

Please sign in to comment.