hsivonen / hsivonen/encoding_rs
Remove unsafe from UTF-16[BE|LE] decoders
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 464
- Forks
- 70
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 2
Description
Rewrite the unaligned slices to wrap &[u8] and to use as_chunks.
Contributor guide
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 the UTF-16BE and UTF-16LE decoder implementations and their existing tests. Inspect the unaligned slice handling and the as_chunks usage; done means both decoders wrap &[u8], use as_chunks, and no longer need the unsafe code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- internationalization
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100