mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
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:
1 parent
0afc59e96b
commit
6c0d01b8de
1 file changed
+2
-1
@@ -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 => {}
|
||||
|
||||
Reference in new issue
Block a user