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

Unnecessary &mut V with get_or_set_with and try_get_or_set_with (CachedAsync) #179

Open
hanako-eo opened this issue Jan 29, 2024 · 0 comments

Comments

@hanako-eo
Copy link

Hi, I'm using the library for a project and I notice that get_or_set_with and try_get_or_set_with return a &mut V and not a &V.
I wonder why you do it this way (because, according to the course, it's not possible to have 2 get_or_set values at the same time without having problems with the compiler). In my case, I need a &V and I would find it more relevant to prefix _mut and then return &mut V.

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

1 participant