aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/tests/heavy_tests/support.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_lsp_server/tests/heavy_tests/support.rs')
-rw-r--r--crates/ra_lsp_server/tests/heavy_tests/support.rs16
1 files changed, 3 insertions, 13 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/support.rs b/crates/ra_lsp_server/tests/heavy_tests/support.rs
index 57a8b4f4d..eee85f8c8 100644
--- a/crates/ra_lsp_server/tests/heavy_tests/support.rs
+++ b/crates/ra_lsp_server/tests/heavy_tests/support.rs
@@ -83,9 +83,7 @@ impl Server {
83 83
84 pub fn doc_id(&self, rel_path: &str) -> TextDocumentIdentifier { 84 pub fn doc_id(&self, rel_path: &str) -> TextDocumentIdentifier {
85 let path = self.dir.path().join(rel_path); 85 let path = self.dir.path().join(rel_path);
86 TextDocumentIdentifier { 86 TextDocumentIdentifier { uri: Url::from_file_path(path).unwrap() }
87 uri: Url::from_file_path(path).unwrap(),
88 }
89 } 87 }
90 88
91 pub fn request<R>(&self, params: R::Params, expected_resp: Value) 89 pub fn request<R>(&self, params: R::Params, expected_resp: Value)
@@ -119,11 +117,7 @@ impl Server {
119 } 117 }
120 fn send_request_(&self, r: RawRequest) -> Value { 118 fn send_request_(&self, r: RawRequest) -> Value {
121 let id = r.id; 119 let id = r.id;
122 self.worker 120 self.worker.as_ref().unwrap().send(RawMessage::Request(r)).unwrap();
123 .as_ref()
124 .unwrap()
125 .send(RawMessage::Request(r))
126 .unwrap();
127 while let Some(msg) = self.recv() { 121 while let Some(msg) = self.recv() {
128 match msg { 122 match msg {
129 RawMessage::Request(req) => panic!("unexpected request: {:?}", req), 123 RawMessage::Request(req) => panic!("unexpected request: {:?}", req),
@@ -169,11 +163,7 @@ impl Server {
169 }) 163 })
170 } 164 }
171 fn send_notification(&self, not: RawNotification) { 165 fn send_notification(&self, not: RawNotification) {
172 self.worker 166 self.worker.as_ref().unwrap().send(RawMessage::Notification(not)).unwrap();
173 .as_ref()
174 .unwrap()
175 .send(RawMessage::Notification(not))
176 .unwrap();
177 } 167 }
178} 168}
179 169