aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorVille Penttinen <[email protected]>2019-02-27 10:57:59 +0000
committerVille Penttinen <[email protected]>2019-02-27 10:57:59 +0000
commit6eb45c1c2be0fb780c4160aaa93c8d3d81e607e2 (patch)
treeb6d466dc0987e64e692a2b4de1111c49e18cf40c /crates
parent33cebe172459d1ae46556c7808411f1f539aa7cf (diff)
Remove RawResponse::empty()
Diffstat (limited to 'crates')
-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,