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
This commit is contained in:
Oleksii (Alexey) Orlenko
2025-12-05 23:27:21 +01:00
committed by GitHub
parent f4b8b0f471
commit e5f87735d3
@@ -524,7 +524,7 @@ impl Render for MarkdownPreviewView {
if e.checked() { "[x]" } else { "[ ]" };
editor.edit(
vec![(
[(
MultiBufferOffset(
e.source_range().start,
)