# markdown_preview: Remove unnecessary vec allocation \(\#44238\) · gitcafe/zed

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

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

Visibility: public

Requested revision: e5f87735d3611b45c778e27b99cc4c6880962901

Requested commit: e5f87735d3611b45c778e27b99cc4c6880962901

Commit: e5f87735d3611b45c778e27b99cc4c6880962901

Tree: 7d034f0eca0bdf9cc3e735acabda5ddc44503ea9

Author: Oleksii \(Alexey\) Orlenko

Committer: GitHub

## Message

```
markdown_preview: Remove unnecessary vec allocation (#44238)

Instead of allocating a one-element vec on the heap, we can just use an
array here (since `Editor::edit` accepts anything that implements
`IntoIterator`).

I haven't checked if there are more instances that can be simplified,
just accidentally stumbled upon this when working on something else in
the markdown preview crate.

Release Notes:

- N/A
```

## Parents

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

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