cloudflare / cloudflare/lol-html

Return &str from `get_attribute`

Open
#74 0 comments 5 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
2.1k
Forks
111
PR merge metrics
No merged PRs in 30d

Description

Most of the time I'm looking at an attribute, I don't actually need to copy it. But `get_attribute()` makes a copy anyway. It would be nice to return a borrow instead.

This would also require changing `Bytes::as_string()` to return a borrow.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.