File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
tests/testsuite/cargo_add/preserve_features_table/out Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -496,6 +496,11 @@ fn fix_feature_activations(
496496 for idx in remove_list. iter ( ) . rev ( ) {
497497 feature_values. remove ( * idx) ;
498498 }
499+ if !remove_list. is_empty ( ) {
500+ // HACK: Instead of cleaning up the users formatting from having removed a feature, we just
501+ // re-format the whole feature list
502+ feature_values. fmt ( ) ;
503+ }
499504
500505 if status == DependencyStatus :: Required {
501506 for value in feature_values. iter_mut ( ) {
@@ -516,8 +521,6 @@ fn fix_feature_activations(
516521 }
517522 }
518523 }
519-
520- feature_values. fmt ( ) ;
521524}
522525
523526pub fn str_or_1_len_table ( item : & toml_edit:: Item ) -> bool {
Original file line number Diff line number Diff line change @@ -9,7 +9,12 @@ edition = "2021"
99your-face = { version = " 99999.0.0" }
1010
1111[features ]
12- default = [" a" , " b" , " c" ]
13- a = [" your-face/nose" ]
12+ default = [
13+ " a" ,
14+ " b" ,
15+ " c" ,
16+ ]
17+ a = [" your-face/nose" , # but not the mouth and nose
18+ ]
1419b = []
1520c = []
You can’t perform that action at this time.
0 commit comments