summaryrefslogtreecommitdiff
path: root/helix-lsp
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-09-09 02:48:08 +0000
committerBlaž Hrastnik2021-09-09 02:49:45 +0000
commitbb47a9a0b8944a5933d45b2c7b6c22cb2e96c4d5 (patch)
treeec9ef779621a0b869d5f7ae50096e8c1b4771854 /helix-lsp
parent394cc4f30f23d6ffbea70e714167ce04e37e02ce (diff)
fix: Fix regression where formatting would fail on null response
Diffstat (limited to 'helix-lsp')
-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())
})
}