Skip to content

Commit

Permalink
Delete dead fields of deserialized cargo output
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
krtab committed Mar 22, 2024
1 parent f60c4ed commit 7342cc4
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2134,18 +2134,9 @@ pub struct CargoTarget<'a> {
#[derive(Deserialize)]
#[serde(tag = "reason", rename_all = "kebab-case")]
pub enum CargoMessage<'a> {
CompilerArtifact {
package_id: Cow<'a, str>,
features: Vec<Cow<'a, str>>,
filenames: Vec<Cow<'a, str>>,
target: CargoTarget<'a>,
},
BuildScriptExecuted {
package_id: Cow<'a, str>,
},
BuildFinished {
success: bool,
},
CompilerArtifact { filenames: Vec<Cow<'a, str>>, target: CargoTarget<'a> },
BuildScriptExecuted,
BuildFinished,
}

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

0 comments on commit 7342cc4

Please sign in to comment.