HeaderMap::iter could be ExactSizedIterator
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 378
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 5
Description
I was surprised that iterating over the entries in the HeaderMap doesn't provide an exact size. This is mainly because there is a len() method with the size of the map. I can provide an ExactSizedIterator wrapper but was wondering if it makes sense to implement it here to make it easier to preallocate transformations?
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
Start by locating HeaderMap::iter and the iterator type it returns. Check the existing HeaderMap length behavior and iterator tests, then verify that the iterator exposes an exact size and that the relevant tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100