jshrake / jshrake/glsl-include
Make Context::expand return Cow 🐄
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
I think it would make sense for Context::expand to take in a slice &'a str and return a Cow<'a, str> to remove extra allocations when the glsl input has no includes.
Would you accept a PR?
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 Context::expand and its callers, then inspect how expansion handles GLSL input with and without includes. Done means the method accepts a string slice and returns the proposed Cow type while preserving expansion behavior and avoiding an allocation when no includes are present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- performance
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100