From e71df60ea382a1290b1959c4d01fea59e8a13c99 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Sun, 3 Dec 2023 19:02:14 +0000 Subject: [PATCH] perf(lsp): fix redundant clones for ts responses (#21445) --- cli/lsp/tsc.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs index e1b37e8544..a8d75ada8e 100644 --- a/cli/lsp/tsc.rs +++ b/cli/lsp/tsc.rs @@ -4452,8 +4452,7 @@ fn request( let state = op_state.borrow_mut::(); 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(