fix: Fix completions disappearing when typing two keys in quick succession
This commit is contained in:
@@ -49,7 +49,7 @@ pub use crate::{caps::server_capabilities, main_loop::main_loop};
|
||||
pub type Error = Box<dyn std::error::Error + Send + Sync>;
|
||||
pub type Result<T, E = Error> = std::result::Result<T, E>;
|
||||
|
||||
pub fn from_json<T: DeserializeOwned>(what: &'static str, json: serde_json::Value) -> Result<T> {
|
||||
pub fn from_json<T: DeserializeOwned>(what: &'static str, json: &serde_json::Value) -> Result<T> {
|
||||
let res = serde_json::from_value(json.clone())
|
||||
.map_err(|e| format!("Failed to deserialize {}: {}; {}", what, e, json))?;
|
||||
Ok(res)
|
||||
|
||||
Reference in New Issue
Block a user