Azure / Azure/typespec-rust

Wasteful clones of URLs made in various places

Open
#872 2 comments 1 reaction 0 assignees View on GitHub
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

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.