Skip to content

minor: clean up project_json::CrateData and its corresponding docs#21540

Merged
ShoyuVanilla merged 2 commits intorust-lang:masterfrom
J3m3:align-optional-fields
Feb 19, 2026
Merged

minor: clean up project_json::CrateData and its corresponding docs#21540
ShoyuVanilla merged 2 commits intorust-lang:masterfrom
J3m3:align-optional-fields

Conversation

@J3m3
Copy link
Copy Markdown
Contributor

@J3m3 J3m3 commented Jan 28, 2026

IMO, each commit message is self-explanatory, so I'll copy-paste them here.

  • Remove #[serde(default)] from optional fields. Fields of type Option are automatically deserialized to None when the corresponding keys are missing in rust-project.json, making the explicit attribute redundant.

  • Mark cfg, env, and is_proc_macro fields optional to match the corresponding data structure, project_json::CrateData.

J3m3 added 2 commits January 28, 2026 14:29
Remove `#[serde(default)]` from optional fields. Fields of type `Option`
are automatically deserialized to `None` when the corresponding keys are
missing in `rust-project.json`, making the explicit attribute redundant.
Mark `cfg`, `env`, and `is_proc_macro` fields optional to match the
corresponding data structure, `project_json::CrateData`.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 28, 2026
Copy link
Copy Markdown
Member

@ShoyuVanilla ShoyuVanilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ShoyuVanilla ShoyuVanilla added this pull request to the merge queue Feb 19, 2026
Merged via the queue into rust-lang:master with commit 039106d Feb 19, 2026
15 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 19, 2026
@J3m3 J3m3 deleted the align-optional-fields branch February 19, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants