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

API for storage get is awkward #210

Open
willemneal opened this issue Feb 10, 2023 · 0 comments
Open

API for storage get is awkward #210

willemneal opened this issue Feb 10, 2023 · 0 comments

Comments

@willemneal
Copy link
Member

willemneal commented Feb 10, 2023

Currently in this repo every example of retrieving things from storage is either storage().get(..).unwrap() or storage().get_unchecked(..), both of which are followed by an .unwrap().

I also find it strange that it's an option wrapping a result. Intuitively to me the operation either success or fails and then the value returned is an option.

And get_unchecked makes more sense if it is not checking the de-serialization not whether the value is present.

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

No branches or pull requests

2 participants
@willemneal and others