From bb47a9a0b8944a5933d45b2c7b6c22cb2e96c4d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Thu, 9 Sep 2021 11:48:08 +0900 Subject: [PATCH] fix: Fix regression where formatting would fail on null response --- helix-lsp/src/client.rs | 4 ++-- 1 file 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 = serde_json::from_value(json)?; - Ok(response) + let response: Option> = serde_json::from_value(json)?; + Ok(response.unwrap_or_default()) }) }