diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2023-12-03 19:02:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-03 19:02:14 +0000 |
commit | 28c527c8f5855f4051cc02973a647741d20cb0fc (patch) | |
tree | 7b196fa4b739da431a7ba140ec8fab608ed76709 | |
parent | 32438d25c337f9160c1c90d48680963654385e22 (diff) |
perf(lsp): fix redundant clones for ts responses (#21445)
-rw-r--r-- | cli/lsp/tsc.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index 210ef701a..072a881c3 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -4443,8 +4443,7 @@ fn request( let state = op_state.borrow_mut::<State>(); performance.measure(mark); - if let Some(response) = state.response.clone() { - state.response = None; + if let Some(response) = state.response.take() { Ok(response.data) } else { Err(custom_error( |