rust-embedded / rust-embedded/heapless

Implement generic `LenType` in other containers.

Open
#551 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2k
Forks
253
Avg merge
1d 2h
Merged PRs (30d)
1

Description

After #504 Vec now has a generic LenType which significantly improves space efficiency, but the other containers depending on Vec do not as to avoid the original PR becoming super wide-reaching and impossible to merge.

This is a tracking issue for adding LenType generics to the other containers.

  • StringInner: (#552)
  • LinearMapInner
  • BinaryHeapInner
  • IndexMap/Set

The following containers use a usize length, but do not depend on Vec:

  • DequeInner
  • HistoryBufInner
  • QueueInner

The following containers have their own implementation of LenType, and should probably be swapped over:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing generic LenType implementation in Vec and compare how the listed containers represent lengths. Work through LinearMapInner, BinaryHeapInner, IndexMap/Set, DequeInner, HistoryBufInner, and QueueInner, noting which depend on Vec and which use usize directly. Done means the remaining unchecked containers use the intended generic length representation, with their existing behavior preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.