perf(oxlint/lsp): preallocate fix-content vec (#25351)

After https://github.com/oxc-project/oxc/pull/24958 we know the size of `Vec<FixedContent>` , because we are only consuming now `Messages.fixes` which are directly mapped into `FixedContent`
This commit is contained in:
Sysix committed 2026-08-07 09:45:27 +00:00
1 parent 0afc59e96b
commit 6c0d01b8de
1 file changed
+2 -1
+2 -1
View File
@@ -169,7 +169,8 @@ pub fn message_to_lsp_diagnostic(
data: None,
};
let mut fixed_content = vec![];
let mut fixed_content = Vec::with_capacity(message.fixes.len());
// Convert PossibleFixes directly to PossibleFixContent
match message.fixes {
PossibleFixes::None => {}