Mandragorian / Mandragorian/crayfish
Make the material attribute in HitRecord a reference instead of a Trait object
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
The material attribute in the HitRecord struct is a Trait object. This is not needed, since the HitRecord shouldn't own a copy of the material, and it is also innefficient, since a copy of the material struct takes place.
Instead, the material attribute should be defined as a reference to something that implements the Material trait.
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 HitRecord struct and the Material trait, then read how HitRecord stores and accesses its material. Change the material field to a reference to a type implementing Material, and confirm the project still builds and its existing behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100