rust-embedded / rust-embedded/heapless
Add owning IntoIterator for IndexSet
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 253
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 1
Description
Hello,
I was trying to get an owning iterator from an IndexSet, but it seems that the it's currently not implemented.
It's a little bit surprising as IndexSet seems to be basically a wrapper for IndexMap which has an owning implementation for IntoIterator here: https://docs.rs/heapless/latest/heapless/index_map/struct.IndexMap.html#impl-IntoIterator-for-IndexMap%3CK,+V,+S,+N%3E
I would like to add support for an owning IntoIterator for IndexSet, for the keys of the set.
Our use case is to iterate over elements of a deduplicated set.
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 with IndexSet's iterator entry points and compare them with the owning IntoIterator implementation for IndexMap linked in the issue. Add owning iteration over IndexSet keys and verify that callers can consume a deduplicated set; the payload names no test file, so confirm the behavior with the existing IndexSet iterator tests if available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100