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

feat: Add must_use to update_user functions #543

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jrconlin
Copy link
Member

@jrconlin jrconlin commented Jan 5, 2024

Closes SYNC-3983

@jrconlin jrconlin requested a review from pjenvey January 5, 2024 21:17
@jrconlin jrconlin self-assigned this Jan 5, 2024
Copy link
Member

@pjenvey pjenvey left a comment

Choose a reason for hiding this comment

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

The plain #[must_use] unfortunately doesn't do it for wrapper types: https://stackoverflow.com/questions/71873348/how-to-make-the-inner-value-of-a-result-must-use

I mentioned in the bug that this would require the use of something like a MustUse<T> wrapper type to enforce the usage of the actual bool. Admittedly this is a bit annoying but this issue isn't high priority either.

@jrconlin
Copy link
Member Author

I'll convert this to a draft so that it's no longer a priority for review.
(Sorry, thought it was a quick win)

@jrconlin jrconlin marked this pull request as draft January 11, 2024 01:07
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