# Avoid redundant string allocations \(\#63377\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/a3f6b96ced39a4dba8d9db55b81d8b6362840899)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: a3f6b96ced39a4dba8d9db55b81d8b6362840899

Requested commit: a3f6b96ced39a4dba8d9db55b81d8b6362840899

Commit: a3f6b96ced39a4dba8d9db55b81d8b6362840899

Tree: ebc862bafdbd17644ed933068a210fcb72bb3ab4

Author: Miguel Raz Guzmán Macedo

Committer: GitHub

## Message

```
Avoid redundant string allocations (#63377)

Remove unnecessary intermediate `String` allocations when constructing
`Arc<str>` and `SharedString` values. Use static `SharedString` storage
for fixed worktree picker identifiers.

Validation:

- `cargo fmt --all -- --check`
- `tooling/lints/single-lint owned_string_into_shared -p editor -p
git_ui_core -p toolchain_selector`
- `cargo test -p editor -p git_ui_core -p toolchain_selector`

Release Notes:

- N/A
```

## Parents

- [956a49e4ca8aa4b7c2c293e1414c91f009824ae3](https://git.cafe/gitcafe/zed/commit/956a49e4ca8aa4b7c2c293e1414c91f009824ae3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/a3f6b96ced39a4dba8d9db55b81d8b6362840899?format=markdown)
