Wasteful clones of URLs made in various places
Open
CodeGen
pillar-performance
- Dominant language
- Rust
- Stars
- 7
- Forks
- 11
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 5
Description
To work with Rust's borrow checker, we often have to make clones of URLs or other strings in order to capture in an `Fn` or `FnMut` e.g., `async move { }`. See https://github.com/Azure/typespec-rust/pull/867#pullrequestreview-3843450315 for one such place and discussion.
We could wrap it in an `Arc` but that also might be overkill. What other options might we have to avoid cloning potentially large strings?
Contributor guide
Assessment
This issue has not been assessed yet.