-
Notifications
You must be signed in to change notification settings - Fork 294
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
Add more safe methods to RawTable #202
Conversation
These methods combine lookup and bucket operations so the caller doesn't have to deal with unsafe bucket methods. - `get`: `find` and `as_ref` - `get_mut`: `find` and `as_mut` - `insert_entry`: `insert` and `as_mut` - `remove_entry`: `find` and `remove` - `erase_entry`: `find` and `erase`
What is the rationale for adding these methods instead of just using the safe API in I have been considering going in the other direction: exposing more functionality in |
I was motivated for this by the That proposed use case is quite a bit like |
If anything, I might like to see |
@Amanieu -- any more thoughts on this? We can close if you think it's not viable, but it seems simple enough to me. |
Sorry, this slipped my mind. I think these are probably fine to add as is. |
And I see you also published 0.9.1, thanks! |
These methods combine lookup and bucket operations so the caller doesn't
have to deal with unsafe bucket methods.
get
:find
andas_ref
get_mut
:find
andas_mut
insert_entry
:insert
andas_mut
remove_entry
:find
andremove
erase_entry
:find
anderase