Move br(count) attribute to desugar to binrw::helpers::count
- Dominant language
- Rust
- Stars
- 853
- Forks
- 56
- PR merge metrics
- No merged PRs in 30d
Description
Unlike the count attribute, which is limited to supporting `Vec`, the count helper function works for any type which implements `FromIterator`.
Upsides:
* Less magic implementation, more type safe
* Adds support for more types
Possible pitfalls:
* Perf regression due to the lack of "fake specialization" provided for `Vec`
* Breaking some existing use-case maybe?
Contributor guide
Research direction
Start by locating the implementation of the count attribute and the binrw::helpers::count helper. Compare how Vec, other FromIterator types, and the Vec path are handled. Done means the attribute desugars through the helper, broader collection types work, and existing behavior and performance-sensitive cases are covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100