hsivonen / hsivonen/encoding_rs

Remove unsafe from UTF-16[BE|LE] decoders

Open Beginner friendly
#134 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.