linebender / linebender/tiny-skia
Derive AnyBitPattern for ColorU8
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 99
- Avg merge
- 2h 52m
- Merged PRs (30d)
- 1
Description
If ColorU8 derived AnyBitPattern, I'd be able to replace the `transmute` calls in this method with bytemuck's `cast` and remove the unsafe code. This will be possible even if `bytemuck` becomes an optional dependency; it'll just have to be guarded by `cfg_attr`.
https://github.com/Pr0methean/OcHd-RustBuild/blob/main/main/src/image_tasks/png_output.rs#L312-L324
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
Locate the ColorU8 definition and inspect its existing derives, then review the linked png_output.rs method at lines 312-324. Done means ColorU8 can derive AnyBitPattern and the referenced transmute calls can be replaced with bytemuck casts, including the optional-dependency cfg_attr case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100