Unnamed repository; edit this file 'description' to name the repository.
fix: Fix regression where formatting would fail on null response
Blaž Hrastnik 2021-09-09
parent 394cc4f · commit bb47a9a
-rw-r--r--helix-lsp/src/client.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-lsp/src/client.rs b/helix-lsp/src/client.rs
index f2bb0059..4068ae1f 100644
--- a/helix-lsp/src/client.rs
+++ b/helix-lsp/src/client.rs
@@ -614,8 +614,8 @@ impl Client {
Some(async move {
let json = request.await?;
- let response: Vec<lsp::TextEdit> = serde_json::from_value(json)?;
- Ok(response)
+ let response: Option<Vec<lsp::TextEdit>> = serde_json::from_value(json)?;
+ Ok(response.unwrap_or_default())
})
}