# Use \`SharedString::new_static\` for string literals \(\#47865\) · gitcafe/zed

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

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

Visibility: public

Requested revision: eb14c9d34535957fb062166e3ff7c65f958f3a57

Requested commit: eb14c9d34535957fb062166e3ff7c65f958f3a57

Commit: eb14c9d34535957fb062166e3ff7c65f958f3a57

Tree: 9f2c66983019b09127b5c8ea226c30732a7267bd

Author: tidely

Committer: GitHub

## Message

```
Use `SharedString::new_static` for string literals (#47865)

Basically just replaced `SharedString::new("` with
`SharedShring::new_static("` which removes the allocation to `Arc<str>`.

Unfortunately this can't be enforced at compile time without trait
specialization which is only available on nightly. You could assert that
`TypeId`'s differ, but `TypeId` only exists at runtime.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
```

## Parents

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

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