usvg: Image.id is always empty
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.1k
- Forks
- 348
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 3
Description
https://github.com/linebender/resvg/blob/f4188ddf7f0f3dcb39e6e4390a4f97040e9abc91/crates/usvg/src/parser/image.rs#L242
The `id` value is already moved into the parent group `id`, so the straightforward fix incurs string cloning performance penalty.
https://github.com/linebender/resvg/blob/f4188ddf7f0f3dcb39e6e4390a4f97040e9abc91/crates/usvg/src/parser/image.rs#L240
Does it make sense to remove the field to reduce confusion?
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
Inspect crates/usvg/src/parser/image.rs around lines 240-242 to trace how the image id is moved into its parent group and why Image.id remains empty. Decide whether the field should be removed or preserved without an unnecessary clone, then validate that the resulting image and group identifiers behave consistently in the existing test suite.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100