Skip to content

Commit 3cd245c

Browse files
authored
fix(script): Don't override the release profile (#14925)
This has been around since #12224 and isn't in the RFC, so its being removed. This is part of #12207. <!-- Thanks for submitting a pull request 🎉! Here are some tips for you: * If this is your first contribution, read "Cargo Contribution Guide" first: https://doc.crates.io/contrib/ * Run `cargo fmt --all` to format your code changes. * Small commits and pull requests are always preferable and easy to review. * If your idea is large and needs feedback from the community, read how: https://doc.crates.io/contrib/process/#working-on-large-features * Cargo takes care of compatibility. Read our design principles: https://doc.crates.io/contrib/design.html * When changing help text of cargo commands, follow the steps to generate docs: https://github.com/rust-lang/cargo/tree/master/src/doc#building-the-man-pages * If your PR is not finished, set it as "draft" PR or add "WIP" in its title. * It's ok to use the CI resources to test your PR, but please don't abuse them. ### What does this PR try to resolve? Explain the motivation behind this change. A clear overview along with an in-depth explanation are helpful. You can use `Fixes #<issue number>` to associate this PR to an existing issue. ### How should we test and review this PR? Demonstrate how you test this change and guide reviewers through your PR. With a smooth review process, a pull request usually gets reviewed quicker. If you don't know how to write and run your tests, please read the guide: https://doc.crates.io/contrib/tests ### Additional information Other information you want to mention in this PR, such as prior arts, future extensions, an unresolved problem, or a TODO list. -->
2 parents 94d274d + ab7469e commit 3cd245c

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

src/cargo/util/toml/embedded.rs

-19
Original file line numberDiff line numberDiff line change
@@ -141,19 +141,6 @@ fn expand_manifest_(
141141
toml::Value::Array(vec![toml::Value::Table(bin)]),
142142
);
143143

144-
let release = manifest
145-
.entry("profile".to_owned())
146-
.or_insert_with(|| toml::Value::Table(Default::default()))
147-
.as_table_mut()
148-
.ok_or_else(|| anyhow::format_err!("`profile` must be a table"))?
149-
.entry("release".to_owned())
150-
.or_insert_with(|| toml::Value::Table(Default::default()))
151-
.as_table_mut()
152-
.ok_or_else(|| anyhow::format_err!("`profile.release` must be a table"))?;
153-
release
154-
.entry("strip".to_owned())
155-
.or_insert_with(|| toml::Value::Boolean(true));
156-
157144
Ok(manifest)
158145
}
159146

@@ -588,9 +575,6 @@ build = false
588575
edition = "2024"
589576
name = "test-"
590577
591-
[profile.release]
592-
strip = true
593-
594578
[workspace]
595579
596580
"#]]
@@ -626,9 +610,6 @@ build = false
626610
edition = "2024"
627611
name = "test-"
628612
629-
[profile.release]
630-
strip = true
631-
632613
[workspace]
633614
634615
"#]]

0 commit comments

Comments
 (0)