We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d360b0 commit 3ca821aCopy full SHA for 3ca821a
crates/lsp/src/lsp.rs
@@ -532,8 +532,9 @@ impl LanguageServer {
532
533
while let Some(msg) = input_handler.notifications_channel.next().await {
534
{
535
- let mut notification_handlers = notification_handlers.lock();
536
- if let Some(handler) = notification_handlers.get_mut(msg.method.as_str()) {
+ let notification_handlers = notification_handlers.lock();
+ if let Some(handler) = notification_handlers.get(msg.method.as_str()).cloned() {
537
+ drop(notification_handlers);
538
handler(msg.id, msg.params.unwrap_or(Value::Null), cx.clone()).await;
539
} else {
540
drop(notification_handlers);
0 commit comments