Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #19009 from lnicola/dont-just-die
minor: Rephrase comment
Laurențiu Nicola 2025-01-23
parent 582af7e · parent 788acba · commit 84d44d0
-rw-r--r--lib/lsp-server/src/msg.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/lsp-server/src/msg.rs b/lib/lsp-server/src/msg.rs
index 074bc43388..2749557b91 100644
--- a/lib/lsp-server/src/msg.rs
+++ b/lib/lsp-server/src/msg.rs
@@ -80,9 +80,9 @@ pub struct Request {
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct Response {
- // JSON RPC allows this to be null if it was impossible
- // to decode the request's id. Ignore this special case
- // and just die horribly.
+ // JSON-RPC allows this to be null if we can't find or parse the
+ // request id. We fail deserialization in that case, so we just
+ // make this field mandatory.
pub id: RequestId,
#[serde(skip_serializing_if = "Option::is_none")]
pub result: Option<serde_json::Value>,