aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/gen_lsp_server/src/msg.rs5
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs7
2 files changed, 5 insertions, 7 deletions
diff --git a/crates/gen_lsp_server/src/msg.rs b/crates/gen_lsp_server/src/msg.rs
index dfd9eeeb4..02c7a1858 100644
--- a/crates/gen_lsp_server/src/msg.rs
+++ b/crates/gen_lsp_server/src/msg.rs
@@ -120,11 +120,6 @@ impl RawResponse {
120 let error = RawResponseError { code, message, data: None }; 120 let error = RawResponseError { code, message, data: None };
121 RawResponse { id, result: None, error: Some(error) } 121 RawResponse { id, result: None, error: Some(error) }
122 } 122 }
123 /// Returns an "empty" RawResponse
124 /// Empty response still has a value `()` in its `result` field.
125 pub fn empty(id: u64) -> RawResponse {
126 RawResponse { id, result: Some(to_value(&()).unwrap()), error: None }
127 }
128} 123}
129 124
130impl RawNotification { 125impl RawNotification {
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index 1baeff266..ce50fb301 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -425,8 +425,11 @@ impl<'a> PoolDispatcher<'a> {
425 // ErrorCode::ContentModified as i32, 425 // ErrorCode::ContentModified as i32,
426 // "content modified".to_string(), 426 // "content modified".to_string(),
427 // ) 427 // )
428 RawResponse::empty(id) 428 RawResponse {
429 429 id,
430 result: Some(serde_json::to_value(&()).unwrap()),
431 error: None,
432 }
430 } else { 433 } else {
431 RawResponse::err( 434 RawResponse::err(
432 id, 435 id,