fix: Fix completions disappearing when typing two keys in quick succession

This commit is contained in:
Lukas Wirth
2022-06-01 00:20:28 +02:00
parent 1234d8647f
commit e2da967578
7 changed files with 83 additions and 74 deletions

View File

@@ -1,7 +1,6 @@
//! Utilities for LSP-related boilerplate code.
use std::{error::Error, ops::Range, sync::Arc};
use std::{ops::Range, sync::Arc};
use ide_db::base_db::Cancelled;
use lsp_server::Notification;
use crate::{
@@ -15,10 +14,6 @@ pub(crate) fn invalid_params_error(message: String) -> LspError {
LspError { code: lsp_server::ErrorCode::InvalidParams as i32, message }
}
pub(crate) fn is_cancelled(e: &(dyn Error + 'static)) -> bool {
e.downcast_ref::<Cancelled>().is_some()
}
pub(crate) fn notification_is<N: lsp_types::notification::Notification>(
notification: &Notification,
) -> bool {