# language: Clean up allocations \(\#36418\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e1d8e3bf6d74f260f8fc5b8d0ec3aa89fb3f6985

Requested commit: e1d8e3bf6d74f260f8fc5b8d0ec3aa89fb3f6985

Commit: e1d8e3bf6d74f260f8fc5b8d0ec3aa89fb3f6985

Tree: a57d08d9cf029dcef626d86401f4fac615a9de0a

Author: tidely

Committer: GitHub

## Message

```
language: Clean up allocations (#36418)

- Correctly pre-allocate `Vec` when deserializing regexes
- Simplify manual `Vec::with_capacity` calls by using `Iterator::unzip`
- Collect directly into `Arc<[T]>` (uses `Vec` internally anyway, but
simplifies code)
- Remove unnecessary `LazyLock` around Atomics by not using const
incompatible `Default` for initialization.

Release Notes:

- N/A
```

## Parents

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

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