Skip to content

Commit 7342cc4

Browse files
committed
Delete dead fields of deserialized cargo output
The dead_code lint was previously eroneously missing this dead code. Since this lint bug has been fixed, the unused field need to be removed or marked as `#[allow(dead_code)]`. Given that this struct is deserialized without #[serde(deny_unknown_fields)] it is ok to simply delete the never read fields.
1 parent f60c4ed commit 7342cc4

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+3-12
Original file line numberDiff line numberDiff line change
@@ -2134,18 +2134,9 @@ pub struct CargoTarget<'a> {
21342134
#[derive(Deserialize)]
21352135
#[serde(tag = "reason", rename_all = "kebab-case")]
21362136
pub enum CargoMessage<'a> {
2137-
CompilerArtifact {
2138-
package_id: Cow<'a, str>,
2139-
features: Vec<Cow<'a, str>>,
2140-
filenames: Vec<Cow<'a, str>>,
2141-
target: CargoTarget<'a>,
2142-
},
2143-
BuildScriptExecuted {
2144-
package_id: Cow<'a, str>,
2145-
},
2146-
BuildFinished {
2147-
success: bool,
2148-
},
2137+
CompilerArtifact { filenames: Vec<Cow<'a, str>>, target: CargoTarget<'a> },
2138+
BuildScriptExecuted,
2139+
BuildFinished,
21492140
}
21502141

21512142
pub fn strip_debug(builder: &Builder<'_>, target: TargetSelection, path: &Path) {

0 commit comments

Comments
 (0)