rust-lang / rust-lang/hashbrown
Consider implementing `entries(&mut self) -> impl Iterator<Item = OccupiedEntryRef>`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3k
- Forks
- 358
- Avg merge
- 11h 57m
- Merged PRs (30d)
- 2
Description
See my comment here for the motivation: https://github.com/rust-lang/rust/issues/59618#issuecomment-1520583112 .
Unfortunately, the impl can't just be added. hashbrown's EntryRefs are currently Send, which means that they can't be allowed to co-exist. Allowing this API would require removing the Send impls on those types. Before someone starts with the implementation, is that something the crate would consider? The tradeoff is pretty clearly well-motivated imo, especially since the entry types already have lifetimes and so aren't exactly likely to be sent across threads much.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked Rust issue comment for the motivation, then inspect hashbrown's EntryRef types and their Send implementations. Determine whether the proposed entries iterator can coexist with those types under the stated tradeoff; the issue is complete when that API and compatibility decision is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100