Skip to content

Commit 3ca821a

Browse files
committed
clippy
1 parent 1d360b0 commit 3ca821a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/lsp/src/lsp.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -532,8 +532,9 @@ impl LanguageServer {
532532

533533
while let Some(msg) = input_handler.notifications_channel.next().await {
534534
{
535-
let mut notification_handlers = notification_handlers.lock();
536-
if let Some(handler) = notification_handlers.get_mut(msg.method.as_str()) {
535+
let notification_handlers = notification_handlers.lock();
536+
if let Some(handler) = notification_handlers.get(msg.method.as_str()).cloned() {
537+
drop(notification_handlers);
537538
handler(msg.id, msg.params.unwrap_or(Value::Null), cx.clone()).await;
538539
} else {
539540
drop(notification_handlers);

0 commit comments

Comments
 (0)