# rustdoc: Add \`CrateName\` newtype \(\#13056\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 44f66aa426b6f641539ab24ffca948f2f2228a8f

Requested commit: 44f66aa426b6f641539ab24ffca948f2f2228a8f

Commit: 44f66aa426b6f641539ab24ffca948f2f2228a8f

Tree: 6f945cceab3f23f7c83ef44cebd0d476df696e6c

Author: Marshall Bowers

Committer: GitHub

## Message

```
rustdoc: Add `CrateName` newtype (#13056)

This PR adds a `CrateName` newtype used to represent crate names.

This makes the code a bit more self-descriptive and prevents confusing
other string values for a crate name.

It also changes the internal representation from a `String` to an
`Arc<str>` for cheaper clones.

Release Notes:

- N/A
```

## Parents

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

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