From 12e3b4c70b5ef23b2fdfc197296d483680e125f9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 8 Feb 2019 14:49:43 +0300 Subject: reformat the world --- crates/ra_lsp_server/tests/heavy_tests/main.rs | 10 ++-------- crates/ra_lsp_server/tests/heavy_tests/support.rs | 16 +++------------- 2 files changed, 5 insertions(+), 21 deletions(-) (limited to 'crates/ra_lsp_server/tests/heavy_tests') diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs index bfb0645a8..e49c87169 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/main.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs @@ -55,10 +55,7 @@ fn foo() { ); server.wait_for_feedback("workspace loaded"); server.request::( - RunnablesParams { - text_document: server.doc_id("lib.rs"), - position: None, - }, + RunnablesParams { text_document: server.doc_id("lib.rs"), position: None }, json!([ { "args": [ "test", "--", "foo", "--nocapture" ], @@ -220,10 +217,7 @@ fn main() {} "#, ); server.wait_for_feedback("workspace loaded"); - let empty_context = || CodeActionContext { - diagnostics: Vec::new(), - only: None, - }; + let empty_context = || CodeActionContext { diagnostics: Vec::new(), only: None }; server.request::( CodeActionParams { text_document: server.doc_id("src/lib.rs"), 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 { pub fn doc_id(&self, rel_path: &str) -> TextDocumentIdentifier { let path = self.dir.path().join(rel_path); - TextDocumentIdentifier { - uri: Url::from_file_path(path).unwrap(), - } + TextDocumentIdentifier { uri: Url::from_file_path(path).unwrap() } } pub fn request(&self, params: R::Params, expected_resp: Value) @@ -119,11 +117,7 @@ impl Server { } fn send_request_(&self, r: RawRequest) -> Value { let id = r.id; - self.worker - .as_ref() - .unwrap() - .send(RawMessage::Request(r)) - .unwrap(); + self.worker.as_ref().unwrap().send(RawMessage::Request(r)).unwrap(); while let Some(msg) = self.recv() { match msg { RawMessage::Request(req) => panic!("unexpected request: {:?}", req), @@ -169,11 +163,7 @@ impl Server { }) } fn send_notification(&self, not: RawNotification) { - self.worker - .as_ref() - .unwrap() - .send(RawMessage::Notification(not)) - .unwrap(); + self.worker.as_ref().unwrap().send(RawMessage::Notification(not)).unwrap(); } } -- cgit v1.2.3