fix: Fix formatting requests hanging when r-a is still starting

The reason for that was that we were calculating the crate defmaps
of the file we are saving by accident causing us to get stuck waiting
on their expensive computation, while we only need the relevant crate
id.
This commit is contained in:
Lukas Wirth
2022-10-17 17:53:50 +02:00
parent 40cbeb5b3d
commit a762baca02
8 changed files with 17 additions and 24 deletions

View File

@@ -52,7 +52,7 @@ impl<'a> RequestDispatcher<'a> {
let _pctx = stdx::panic_context::enter(panic_context);
f(self.global_state, params)
};
if let Ok(response) = result_to_response::<R>(req.id.clone(), result) {
if let Ok(response) = result_to_response::<R>(req.id, result) {
self.global_state.respond(response);
}
@@ -80,7 +80,7 @@ impl<'a> RequestDispatcher<'a> {
f(global_state_snapshot, params)
});
if let Ok(response) = thread_result_to_response::<R>(req.id.clone(), result) {
if let Ok(response) = thread_result_to_response::<R>(req.id, result) {
self.global_state.respond(response);
}