-
Notifications
You must be signed in to change notification settings - Fork 158
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
Support get_or_insert_with
#355
Comments
I would prefer to wait for the (I authored that initially, but anyone could chase that to completion.) |
It's worth mentioning that the version by value, |
My use case is kind of a micro-optimisation when I want to insert a possibly big borrowed value into the set. For efficiency reasons, I want to clone it only if it is not present. But |
Yeah, understood. Another potential workaround is to make the clone cheaper, like wrapping the expensive part in |
Could you please support something like this? https://docs.rs/hashbrown/latest/hashbrown/struct.HashSet.html#method.get_or_insert_with
The text was updated successfully, but these errors were encountered: