-
Notifications
You must be signed in to change notification settings - Fork 313
Add RawTable#is_full #354
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 RawTable#is_full #354
Conversation
45afad8
to
ddf3ae9
Compare
There's currently no way to tell if a particular bucket is full. This can be handy for choosing a random element or iterating over a hash table in a specific order of buckets, so I've added the is_full function to RawTable.
Ok, so I changed this up so the build is passing and also refactored a bit. Hope you like it! Also, I'm considering using I would love any feedback on the name, the general idea, or anything else you'd like to talk about! 😺 |
I think Otherwise I think this is a good addition, but it should be |
Done and done. Thank you for the feedback @Amanieu! |
Just like rust-lang#335 did for `HashMap`, I'd like to add access to the underlying `RawTable` for `HashSet`. I intend to use it in conjunction with rust-lang#354 to pull random elements from a `HashSet`.
Just like rust-lang#335 did for `HashMap`, I'd like to add access to the underlying `RawTable` for `HashSet`. I intend to use it in conjunction with rust-lang#354 to pull random elements from a `HashSet`.
Just like rust-lang#335 did for `HashMap`, I'd like to add access to the underlying `RawTable` for `HashSet`. I intend to use it in conjunction with rust-lang#354 to pull random elements from a `HashSet`.
@bors r+ |
☀️ Test successful - checks-actions |
Add HashSet#raw_table Just like #335 did for `HashMap`, I'd like to add access to the underlying `RawTable` for `HashSet`. I intend to use it in conjunction with #354 to pull random elements from a `HashSet`. Let me know if I've missed something here or you'd like things implemented differently. I'll be happy to change it up!
Thank you! |
There's currently no way to tell if a particular bucket is full. This can be handy for choosing a random element or iterating over a hash table in a specific order of buckets, so I've added the
is_full
function to RawTable.