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

Add field attribute to disable (partial) getter generation #45

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

Kriskras99
Copy link
Contributor

@Kriskras99 Kriskras99 commented Nov 2, 2024

This allows the following struct to work:

#[superstruct(variants(A, B))]
struct NoGetter {
    #[superstruct(only(A), no_getter)]
    pub x: u64,
    #[superstruct(only(B), no_getter)]
    pub x: String,
}

This PR also upgrades Syn to 2.0 and Darling to 0.20.

Fixes #43.

Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you for implementing this!

@michaelsproul michaelsproul added this pull request to the merge queue Nov 11, 2024
Merged via the queue into sigp:main with commit 7da3978 Nov 11, 2024
4 checks passed
@Kriskras99 Kriskras99 deleted the no_getter branch November 11, 2024 07:21
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.

Disable getters for specific fields
2 participants