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

refactor(auth permissions): use return type Result<()> instead of Result<bool> in some cases to indicate success/failure rather than always returning Ok(true/false) #372

Merged
merged 1 commit into from
May 12, 2024

Conversation

AnthonyMichaelTDM
Copy link
Collaborator

The other option was to return just the boolean, but returning a Result<()> is more ergonomic for the user than bool, just because then the function signiture explicitly tells users that the returned value indicates success/failure rather than having them need to read the documentation to know that.

…ult<bool> in some cases to indicate success/failure rather than always returning Ok(true/false)

The other option was to return just the boolean, but returning a Result<()> is more ergonomic for the user than bool, just because then the function signiture explicitly tells users that the returned value indicates success/failure rather than having them need to read the documentation to know that.
@AnthonyMichaelTDM
Copy link
Collaborator Author

lmk if I'm breaking these up too small by the way

Copy link
Owner

@Wulf Wulf left a comment

Choose a reason for hiding this comment

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

thanks for the smaller changesets

Also, agreed -- it's definitely more ergonomic!

@AnthonyMichaelTDM AnthonyMichaelTDM merged commit da47e0f into Wulf:main May 12, 2024
6 checks passed
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