mirror of
https://github.com/denoland/deno.git
synced 2024-12-21 23:04:45 -05:00
perf(lsp): fix redundant walk when collecting tsc code lenses (#20974)
This commit is contained in:
parent
be97170a19
commit
79a9f2a77c
1 changed files with 5 additions and 0 deletions
|
@ -427,6 +427,11 @@ async fn collect_tsc(
|
|||
line_index: Arc<LineIndex>,
|
||||
navigation_tree: &NavigationTree,
|
||||
) -> Result<Vec<lsp::CodeLens>, AnyError> {
|
||||
if !workspace_settings.code_lens.implementations
|
||||
&& !workspace_settings.code_lens.references
|
||||
{
|
||||
return Ok(vec![]);
|
||||
}
|
||||
let code_lenses = Rc::new(RefCell::new(Vec::new()));
|
||||
navigation_tree.walk(&|i, mp| {
|
||||
let mut code_lenses = code_lenses.borrow_mut();
|
||||
|
|
Loading…
Reference in a new issue