1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-28 16:20:57 -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 Bartek Iwańczuk
parent b012c1692a
commit e71df60ea3
No known key found for this signature in database
GPG key ID: 0C6BCDDC3B3AD750

View file

@ -4452,8 +4452,7 @@ fn request(
let state = op_state.borrow_mut::<State>(); let state = op_state.borrow_mut::<State>();
performance.measure(mark); performance.measure(mark);
if let Some(response) = state.response.clone() { if let Some(response) = state.response.take() {
state.response = None;
Ok(response.data) Ok(response.data)
} else { } else {
Err(custom_error( Err(custom_error(