1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00

perf(lsp): fix redundant clones for ts responses (#21445)

This commit is contained in:
Nayeem Rahman 2023-12-03 19:02:14 +00:00 committed by GitHub
parent 32438d25c3
commit 28c527c8f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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(