Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make rules processing attribute optional #321

Merged
merged 3 commits into from
Aug 24, 2023
Merged

Conversation

madig
Copy link
Collaborator

@madig madig commented Aug 24, 2023

Brown-paper-bag PR.

@@ -53,8 +53,7 @@ pub struct Axis {
#[serde(rename = "@default")]
pub default: f32,
/// Records whether this axis needs to be hidden in interfaces.
#[serde(default)]
#[serde(rename = "@hidden")]
#[serde(default, rename = "@hidden", skip_serializing_if = "is_false")]
Copy link
Member

Choose a reason for hiding this comment

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

maybe we can just do,

Suggested change
#[serde(default, rename = "@hidden", skip_serializing_if = "is_false")]
#[serde(default, rename = "@hidden", skip_serializing_if = "std::convert::identity")]

🤔

Copy link
Member

Choose a reason for hiding this comment

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

edit: I tried, it doesn't work :(

Copy link
Member

@cmyr cmyr left a comment

Choose a reason for hiding this comment

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

👝

@cmyr cmyr merged commit ca101fe into master Aug 24, 2023
4 checks passed
@cmyr cmyr deleted the optional-processing-field branch August 24, 2023 19:56
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.

2 participants