rust-embedded / rust-embedded/heapless
Infallible Vec operations
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 253
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 1
Description
Some operations on a Vec<T, N> are infallible but can only be implemented using fallible methods. What do you think about adding more infallible methods? For example:
from_array(data: [T; N]): construct aVecfrom an array with the same capacity (would also be useful for constants)fill(&mut self, value: T): resize to capacity and clonevalueto empty slotsfill_default(&mut self): resize to capacity and writeT::default()to empty slotsreplace(&mut self, other: &Self): clear thisVecand copy the data fromother
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
Review the existing fallible Vec<T, N> methods and the four proposed operations: from_array, fill, fill_default, and replace. Compare their intended behavior with the no-std, static-friendly constraints, then determine the API and tests needed for each method; done means the infallible operations are implemented with agreed semantics.
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