From 716ae6238f389cad29b519b5463a77121ea1d801 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 17 Oct 2023 12:23:45 -0500 Subject: [PATCH 1/3] test(add): Check table formatting issues --- tests/testsuite/cargo_add/mod.rs | 1 + .../preserve_dep_std_table/in/Cargo.toml | 14 +++++++++ .../preserve_dep_std_table/in/src/lib.rs | 0 .../cargo_add/preserve_dep_std_table/mod.rs | 31 +++++++++++++++++++ .../preserve_dep_std_table/out/Cargo.toml | 10 ++++++ .../preserve_dep_std_table/stderr.log | 7 +++++ .../preserve_dep_std_table/stdout.log | 0 7 files changed, 63 insertions(+) create mode 100644 tests/testsuite/cargo_add/preserve_dep_std_table/in/Cargo.toml create mode 100644 tests/testsuite/cargo_add/preserve_dep_std_table/in/src/lib.rs create mode 100644 tests/testsuite/cargo_add/preserve_dep_std_table/mod.rs create mode 100644 tests/testsuite/cargo_add/preserve_dep_std_table/out/Cargo.toml create mode 100644 tests/testsuite/cargo_add/preserve_dep_std_table/stderr.log create mode 100644 tests/testsuite/cargo_add/preserve_dep_std_table/stdout.log diff --git a/tests/testsuite/cargo_add/mod.rs b/tests/testsuite/cargo_add/mod.rs index 8c03b30dce6..e8633b0c43a 100644 --- a/tests/testsuite/cargo_add/mod.rs +++ b/tests/testsuite/cargo_add/mod.rs @@ -99,6 +99,7 @@ mod path_dev; mod path_inferred_name; mod path_inferred_name_conflicts_full_feature; mod path_normalized_name; +mod preserve_dep_std_table; mod preserve_features_table; mod preserve_sorted; mod preserve_unsorted; diff --git a/tests/testsuite/cargo_add/preserve_dep_std_table/in/Cargo.toml b/tests/testsuite/cargo_add/preserve_dep_std_table/in/Cargo.toml new file mode 100644 index 00000000000..aa8584ff407 --- /dev/null +++ b/tests/testsuite/cargo_add/preserve_dep_std_table/in/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "xxx" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies.your-face] +# Leading version +version = "99999.0.0" # Trailing version +# Leading optional +optional = true # Trailing optional +# Leading features +features = [] # Trailing features diff --git a/tests/testsuite/cargo_add/preserve_dep_std_table/in/src/lib.rs b/tests/testsuite/cargo_add/preserve_dep_std_table/in/src/lib.rs new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/testsuite/cargo_add/preserve_dep_std_table/mod.rs b/tests/testsuite/cargo_add/preserve_dep_std_table/mod.rs new file mode 100644 index 00000000000..1998fa7420e --- /dev/null +++ b/tests/testsuite/cargo_add/preserve_dep_std_table/mod.rs @@ -0,0 +1,31 @@ +use cargo_test_support::compare::assert_ui; +use cargo_test_support::prelude::*; +use cargo_test_support::Project; + +use cargo_test_support::curr_dir; + +#[cargo_test] +fn case() { + cargo_test_support::registry::init(); + cargo_test_support::registry::Package::new("your-face", "99999.0.0+my-package") + .feature("nose", &[]) + .feature("mouth", &[]) + .feature("eyes", &[]) + .feature("ears", &[]) + .publish(); + + let project = Project::from_template(curr_dir!().join("in")); + let project_root = project.root(); + let cwd = &project_root; + + snapbox::cmd::Command::cargo_ui() + .arg("add") + .arg_line("your-face --no-optional") + .current_dir(cwd) + .assert() + .success() + .stdout_matches_path(curr_dir!().join("stdout.log")) + .stderr_matches_path(curr_dir!().join("stderr.log")); + + assert_ui().subset_matches(curr_dir!().join("out"), &project_root); +} diff --git a/tests/testsuite/cargo_add/preserve_dep_std_table/out/Cargo.toml b/tests/testsuite/cargo_add/preserve_dep_std_table/out/Cargo.toml new file mode 100644 index 00000000000..3e952bec918 --- /dev/null +++ b/tests/testsuite/cargo_add/preserve_dep_std_table/out/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "xxx" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies.your-face] +version = "99999.0.0" +features = [] diff --git a/tests/testsuite/cargo_add/preserve_dep_std_table/stderr.log b/tests/testsuite/cargo_add/preserve_dep_std_table/stderr.log new file mode 100644 index 00000000000..796b9601b4d --- /dev/null +++ b/tests/testsuite/cargo_add/preserve_dep_std_table/stderr.log @@ -0,0 +1,7 @@ + Updating `dummy-registry` index + Adding your-face v99999.0.0 to dependencies. + Features: + - ears + - eyes + - mouth + - nose diff --git a/tests/testsuite/cargo_add/preserve_dep_std_table/stdout.log b/tests/testsuite/cargo_add/preserve_dep_std_table/stdout.log new file mode 100644 index 00000000000..e69de29bb2d From 99e4847d78743abb3aab2d087c7b084a7f491753 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 17 Oct 2023 12:39:48 -0500 Subject: [PATCH 2/3] fix(add): Stop auto-formatting content Huh, overlooked the cargo side when I fixed this in killercup/cargo-edit#725 Fixes #10850 --- src/cargo/util/toml_mut/dependency.rs | 45 ++++++++++++------- .../out/primary/Cargo.toml | 2 +- .../out/Cargo.toml | 4 +- .../out/Cargo.toml | 4 +- .../out/Cargo.toml | 2 +- .../overwrite_version_with_git/out/Cargo.toml | 2 +- .../out/primary/Cargo.toml | 2 +- .../out/primary/Cargo.toml | 2 +- .../preserve_dep_std_table/out/Cargo.toml | 6 ++- .../preserve_features_table/out/Cargo.toml | 2 +- .../cargo_add/require_weak/out/Cargo.toml | 2 +- 11 files changed, 43 insertions(+), 30 deletions(-) diff --git a/src/cargo/util/toml_mut/dependency.rs b/src/cargo/util/toml_mut/dependency.rs index 2f39b7ab4e4..88298fa8d54 100644 --- a/src/cargo/util/toml_mut/dependency.rs +++ b/src/cargo/util/toml_mut/dependency.rs @@ -464,7 +464,7 @@ impl Dependency { } else if let Some(table) = item.as_table_like_mut() { match &self.source { Some(Source::Registry(src)) => { - table.insert("version", toml_edit::value(src.version.as_str())); + overwrite_value(table, "version", src.version.as_str()); for key in ["path", "git", "branch", "tag", "rev", "workspace"] { table.remove(key); @@ -472,9 +472,9 @@ impl Dependency { } Some(Source::Path(src)) => { let relpath = path_field(crate_root, &src.path); - table.insert("path", toml_edit::value(relpath)); + overwrite_value(table, "path", relpath); if let Some(r) = src.version.as_deref() { - table.insert("version", toml_edit::value(r)); + overwrite_value(table, "version", r); } else { table.remove("version"); } @@ -484,24 +484,24 @@ impl Dependency { } } Some(Source::Git(src)) => { - table.insert("git", toml_edit::value(src.git.as_str())); + overwrite_value(table, "git", src.git.as_str()); if let Some(branch) = src.branch.as_deref() { - table.insert("branch", toml_edit::value(branch)); + overwrite_value(table, "branch", branch); } else { table.remove("branch"); } if let Some(tag) = src.tag.as_deref() { - table.insert("tag", toml_edit::value(tag)); + overwrite_value(table, "tag", tag); } else { table.remove("tag"); } if let Some(rev) = src.rev.as_deref() { - table.insert("rev", toml_edit::value(rev)); + overwrite_value(table, "rev", rev); } else { table.remove("rev"); } if let Some(r) = src.version.as_deref() { - table.insert("version", toml_edit::value(r)); + overwrite_value(table, "version", r); } else { table.remove("version"); } @@ -511,7 +511,7 @@ impl Dependency { } } Some(Source::Workspace(_)) => { - table.insert("workspace", toml_edit::value(true)); + overwrite_value(table, "workspace", true); table.set_dotted(true); key.fmt(); for key in [ @@ -533,7 +533,7 @@ impl Dependency { } if table.contains_key("version") { if let Some(r) = self.registry.as_deref() { - table.insert("registry", toml_edit::value(r)); + overwrite_value(table, "registry", r); } else { table.remove("registry"); } @@ -542,11 +542,11 @@ impl Dependency { } if self.rename.is_some() { - table.insert("package", toml_edit::value(self.name.as_str())); + overwrite_value(table, "package", self.name.as_str()); } match self.default_features { Some(v) => { - table.insert("default-features", toml_edit::value(v)); + overwrite_value(table, "default-features", v); } None => { table.remove("default-features"); @@ -564,29 +564,40 @@ impl Dependency { }) .unwrap_or_default(); features.extend(new_features.iter().map(|s| s.as_str())); - let features = toml_edit::value(features.into_iter().collect::()); + let features = features.into_iter().collect::(); table.set_dotted(false); - table.insert("features", features); + overwrite_value(table, "features", features); } else { table.remove("features"); } match self.optional { Some(v) => { table.set_dotted(false); - table.insert("optional", toml_edit::value(v)); + overwrite_value(table, "optional", v); } None => { table.remove("optional"); } } - - table.fmt(); } else { unreachable!("Invalid dependency type: {}", item.type_name()); } } } +fn overwrite_value( + table: &mut dyn toml_edit::TableLike, + key: &str, + value: impl Into, +) { + let mut value = value.into(); + let existing = table.entry(key).or_insert_with(|| Default::default()); + if let Some(existing_value) = existing.as_value() { + *value.decor_mut() = existing_value.decor().clone(); + } + *existing = toml_edit::Item::Value(value); +} + fn invalid_type(dep: &str, key: &str, actual: &str, expected: &str) -> anyhow::Error { anyhow::format_err!("Found {actual} for {key} when {expected} was expected for {dep}") } diff --git a/tests/testsuite/cargo_add/overwrite_git_with_path/out/primary/Cargo.toml b/tests/testsuite/cargo_add/overwrite_git_with_path/out/primary/Cargo.toml index ad120548123..0bc5aba3c50 100644 --- a/tests/testsuite/cargo_add/overwrite_git_with_path/out/primary/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_git_with_path/out/primary/Cargo.toml @@ -5,4 +5,4 @@ name = "cargo-list-test-fixture" version = "0.0.0" [dependencies] -cargo-list-test-fixture-dependency = { optional = true, path = "../dependency", version = "0.0.0" } +cargo-list-test-fixture-dependency = { optional = true , path = "../dependency", version = "0.0.0" } diff --git a/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/out/Cargo.toml b/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/out/Cargo.toml index b9e8985c6d4..422b7878dd1 100644 --- a/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/out/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/out/Cargo.toml @@ -5,5 +5,5 @@ name = "cargo-list-test-fixture" version = "0.0.0" [dependencies] -my-package1 = { version = "99999.0.0" } -my-package2 = { version = "0.4.1" } +my-package1 = { version = "99999.0.0"} +my-package2 = { version = "0.4.1"} diff --git a/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/out/Cargo.toml b/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/out/Cargo.toml index bf6c52963b8..edba3898acb 100644 --- a/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/out/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/out/Cargo.toml @@ -9,5 +9,5 @@ default = [] other = ["your-face/nose"] [dependencies] -your-face = { version = "99999.0.0" } -my-package2 = { version = "0.4.1" } +your-face = { version = "99999.0.0"} +my-package2 = { version = "0.4.1"} diff --git a/tests/testsuite/cargo_add/overwrite_preserves_inline_table/out/Cargo.toml b/tests/testsuite/cargo_add/overwrite_preserves_inline_table/out/Cargo.toml index f204a895ee9..4ac1ef22ef4 100644 --- a/tests/testsuite/cargo_add/overwrite_preserves_inline_table/out/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_preserves_inline_table/out/Cargo.toml @@ -5,4 +5,4 @@ name = "cargo-list-test-fixture" version = "0.0.0" [dependencies] -your-face={ version = "99999.0.0", features = ["eyes", "nose"] } # Hello world +your-face={version="99999.0.0",features=["eyes", "nose"]} # Hello world diff --git a/tests/testsuite/cargo_add/overwrite_version_with_git/out/Cargo.toml b/tests/testsuite/cargo_add/overwrite_version_with_git/out/Cargo.toml index 26001402414..fbed3e86123 100644 --- a/tests/testsuite/cargo_add/overwrite_version_with_git/out/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_version_with_git/out/Cargo.toml @@ -5,4 +5,4 @@ name = "cargo-list-test-fixture" version = "0.0.0" [dependencies] -versioned-package = { version = "0.3.0", optional = true, git = "[ROOTURL]/versioned-package" } +versioned-package = { version = "0.3.0", optional = true , git = "[ROOTURL]/versioned-package" } diff --git a/tests/testsuite/cargo_add/overwrite_version_with_path/out/primary/Cargo.toml b/tests/testsuite/cargo_add/overwrite_version_with_path/out/primary/Cargo.toml index 07253670afe..0ea40970e8c 100644 --- a/tests/testsuite/cargo_add/overwrite_version_with_path/out/primary/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_version_with_path/out/primary/Cargo.toml @@ -5,4 +5,4 @@ name = "cargo-list-test-fixture" version = "0.0.0" [dependencies] -cargo-list-test-fixture-dependency = { version = "0.0.0", optional = true, path = "../dependency" } +cargo-list-test-fixture-dependency = { version = "0.0.0", optional = true , path = "../dependency" } diff --git a/tests/testsuite/cargo_add/overwrite_workspace_dep_features/out/primary/Cargo.toml b/tests/testsuite/cargo_add/overwrite_workspace_dep_features/out/primary/Cargo.toml index 6f95ded6fc4..763989db273 100644 --- a/tests/testsuite/cargo_add/overwrite_workspace_dep_features/out/primary/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_workspace_dep_features/out/primary/Cargo.toml @@ -3,4 +3,4 @@ name = "bar" version = "0.0.0" [dependencies] -foo = { features = ["test"], path = "../dependency", version = "0.0.0" } +foo = { features = ["test"] , path = "../dependency", version = "0.0.0" } diff --git a/tests/testsuite/cargo_add/preserve_dep_std_table/out/Cargo.toml b/tests/testsuite/cargo_add/preserve_dep_std_table/out/Cargo.toml index 3e952bec918..76e50ce3732 100644 --- a/tests/testsuite/cargo_add/preserve_dep_std_table/out/Cargo.toml +++ b/tests/testsuite/cargo_add/preserve_dep_std_table/out/Cargo.toml @@ -6,5 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies.your-face] -version = "99999.0.0" -features = [] +# Leading version +version = "99999.0.0" # Trailing version +# Leading features +features = [] # Trailing features diff --git a/tests/testsuite/cargo_add/preserve_features_table/out/Cargo.toml b/tests/testsuite/cargo_add/preserve_features_table/out/Cargo.toml index 39acd101601..0e6e1a47f5b 100644 --- a/tests/testsuite/cargo_add/preserve_features_table/out/Cargo.toml +++ b/tests/testsuite/cargo_add/preserve_features_table/out/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -your-face = { version = "99999.0.0" } +your-face = { version = "99999.0.0"} [features] default = [ diff --git a/tests/testsuite/cargo_add/require_weak/out/Cargo.toml b/tests/testsuite/cargo_add/require_weak/out/Cargo.toml index a0e4b9753bc..3d5680fcf47 100644 --- a/tests/testsuite/cargo_add/require_weak/out/Cargo.toml +++ b/tests/testsuite/cargo_add/require_weak/out/Cargo.toml @@ -8,4 +8,4 @@ version = "0.0.0" eyes = ["your-face/eyes"] [dependencies] -your-face = { version = "99999.0.0" } +your-face = { version = "99999.0.0"} From 02dd9175117fd34aa172a45d7b360f17865f1f54 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 17 Oct 2023 12:44:05 -0500 Subject: [PATCH 3/3] fix(add): Add back in some auto-formatting This moves the auto-format to the correct place so it takes effect. --- src/cargo/util/toml_mut/manifest.rs | 9 ++++++--- .../overwrite_git_with_path/out/primary/Cargo.toml | 2 +- .../out/Cargo.toml | 4 ++-- .../overwrite_optional_with_no_optional/out/Cargo.toml | 4 ++-- .../overwrite_preserves_inline_table/out/Cargo.toml | 2 +- .../cargo_add/overwrite_version_with_git/out/Cargo.toml | 2 +- .../overwrite_version_with_path/out/primary/Cargo.toml | 2 +- .../out/primary/Cargo.toml | 2 +- .../cargo_add/preserve_features_table/out/Cargo.toml | 2 +- tests/testsuite/cargo_add/require_weak/out/Cargo.toml | 2 +- 10 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/cargo/util/toml_mut/manifest.rs b/src/cargo/util/toml_mut/manifest.rs index 7d51f6b5c05..a5050752995 100644 --- a/src/cargo/util/toml_mut/manifest.rs +++ b/src/cargo/util/toml_mut/manifest.rs @@ -349,13 +349,16 @@ impl LocalManifest { .get_key_value_mut(dep_key) { dep.update_toml(&crate_root, &mut dep_key, dep_item); + if let Some(table) = dep_item.as_inline_table_mut() { + // So long as we don't have `Cargo.toml` auto-formatting and inline-tables can only + // be on one line, there isn't really much in the way of interesting formatting to + // include (no comments), so let's just wipe it clean + table.fmt(); + } } else { let new_dependency = dep.to_toml(&crate_root); table[dep_key] = new_dependency; } - if let Some(t) = table.as_inline_table_mut() { - t.fmt() - } Ok(()) } diff --git a/tests/testsuite/cargo_add/overwrite_git_with_path/out/primary/Cargo.toml b/tests/testsuite/cargo_add/overwrite_git_with_path/out/primary/Cargo.toml index 0bc5aba3c50..ad120548123 100644 --- a/tests/testsuite/cargo_add/overwrite_git_with_path/out/primary/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_git_with_path/out/primary/Cargo.toml @@ -5,4 +5,4 @@ name = "cargo-list-test-fixture" version = "0.0.0" [dependencies] -cargo-list-test-fixture-dependency = { optional = true , path = "../dependency", version = "0.0.0" } +cargo-list-test-fixture-dependency = { optional = true, path = "../dependency", version = "0.0.0" } diff --git a/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/out/Cargo.toml b/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/out/Cargo.toml index 422b7878dd1..b9e8985c6d4 100644 --- a/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/out/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_no_default_features_with_default_features/out/Cargo.toml @@ -5,5 +5,5 @@ name = "cargo-list-test-fixture" version = "0.0.0" [dependencies] -my-package1 = { version = "99999.0.0"} -my-package2 = { version = "0.4.1"} +my-package1 = { version = "99999.0.0" } +my-package2 = { version = "0.4.1" } diff --git a/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/out/Cargo.toml b/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/out/Cargo.toml index edba3898acb..bf6c52963b8 100644 --- a/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/out/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_optional_with_no_optional/out/Cargo.toml @@ -9,5 +9,5 @@ default = [] other = ["your-face/nose"] [dependencies] -your-face = { version = "99999.0.0"} -my-package2 = { version = "0.4.1"} +your-face = { version = "99999.0.0" } +my-package2 = { version = "0.4.1" } diff --git a/tests/testsuite/cargo_add/overwrite_preserves_inline_table/out/Cargo.toml b/tests/testsuite/cargo_add/overwrite_preserves_inline_table/out/Cargo.toml index 4ac1ef22ef4..f204a895ee9 100644 --- a/tests/testsuite/cargo_add/overwrite_preserves_inline_table/out/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_preserves_inline_table/out/Cargo.toml @@ -5,4 +5,4 @@ name = "cargo-list-test-fixture" version = "0.0.0" [dependencies] -your-face={version="99999.0.0",features=["eyes", "nose"]} # Hello world +your-face={ version = "99999.0.0", features = ["eyes", "nose"] } # Hello world diff --git a/tests/testsuite/cargo_add/overwrite_version_with_git/out/Cargo.toml b/tests/testsuite/cargo_add/overwrite_version_with_git/out/Cargo.toml index fbed3e86123..26001402414 100644 --- a/tests/testsuite/cargo_add/overwrite_version_with_git/out/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_version_with_git/out/Cargo.toml @@ -5,4 +5,4 @@ name = "cargo-list-test-fixture" version = "0.0.0" [dependencies] -versioned-package = { version = "0.3.0", optional = true , git = "[ROOTURL]/versioned-package" } +versioned-package = { version = "0.3.0", optional = true, git = "[ROOTURL]/versioned-package" } diff --git a/tests/testsuite/cargo_add/overwrite_version_with_path/out/primary/Cargo.toml b/tests/testsuite/cargo_add/overwrite_version_with_path/out/primary/Cargo.toml index 0ea40970e8c..07253670afe 100644 --- a/tests/testsuite/cargo_add/overwrite_version_with_path/out/primary/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_version_with_path/out/primary/Cargo.toml @@ -5,4 +5,4 @@ name = "cargo-list-test-fixture" version = "0.0.0" [dependencies] -cargo-list-test-fixture-dependency = { version = "0.0.0", optional = true , path = "../dependency" } +cargo-list-test-fixture-dependency = { version = "0.0.0", optional = true, path = "../dependency" } diff --git a/tests/testsuite/cargo_add/overwrite_workspace_dep_features/out/primary/Cargo.toml b/tests/testsuite/cargo_add/overwrite_workspace_dep_features/out/primary/Cargo.toml index 763989db273..6f95ded6fc4 100644 --- a/tests/testsuite/cargo_add/overwrite_workspace_dep_features/out/primary/Cargo.toml +++ b/tests/testsuite/cargo_add/overwrite_workspace_dep_features/out/primary/Cargo.toml @@ -3,4 +3,4 @@ name = "bar" version = "0.0.0" [dependencies] -foo = { features = ["test"] , path = "../dependency", version = "0.0.0" } +foo = { features = ["test"], path = "../dependency", version = "0.0.0" } diff --git a/tests/testsuite/cargo_add/preserve_features_table/out/Cargo.toml b/tests/testsuite/cargo_add/preserve_features_table/out/Cargo.toml index 0e6e1a47f5b..39acd101601 100644 --- a/tests/testsuite/cargo_add/preserve_features_table/out/Cargo.toml +++ b/tests/testsuite/cargo_add/preserve_features_table/out/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -your-face = { version = "99999.0.0"} +your-face = { version = "99999.0.0" } [features] default = [ diff --git a/tests/testsuite/cargo_add/require_weak/out/Cargo.toml b/tests/testsuite/cargo_add/require_weak/out/Cargo.toml index 3d5680fcf47..a0e4b9753bc 100644 --- a/tests/testsuite/cargo_add/require_weak/out/Cargo.toml +++ b/tests/testsuite/cargo_add/require_weak/out/Cargo.toml @@ -8,4 +8,4 @@ version = "0.0.0" eyes = ["your-face/eyes"] [dependencies] -your-face = { version = "99999.0.0"} +your-face = { version = "99999.0.0" }