diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-08 10:55:23 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-08 10:55:23 +0100 |
commit | 5ce2b4819ec37faa6b7ac1afe006ae03865ad544 (patch) | |
tree | e627fd15f070cd210c379f033b54ea004309d7ab /crates/ra_lsp_server/tests/heavy_tests | |
parent | 5b19825e376b67aabbe8d5b163bf69b1acd92f04 (diff) | |
parent | 9c6e93cd6c108536015272b6a363ed5cc1d4fb44 (diff) |
Merge #1504
1504: Simplify LSP handlers r=matklad a=kjeremy
Takes advantage of protocol inheritance via composition and simplifies some responses via the `From`/`Into` traits.
Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/tests/heavy_tests')
-rw-r--r-- | crates/ra_lsp_server/tests/heavy_tests/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/tests/heavy_tests/main.rs b/crates/ra_lsp_server/tests/heavy_tests/main.rs index d271b02fc..451be32a8 100644 --- a/crates/ra_lsp_server/tests/heavy_tests/main.rs +++ b/crates/ra_lsp_server/tests/heavy_tests/main.rs | |||
@@ -37,9 +37,11 @@ use std::collections::Spam; | |||
37 | eprintln!("loading took {:?}", project_start.elapsed()); | 37 | eprintln!("loading took {:?}", project_start.elapsed()); |
38 | let completion_start = Instant::now(); | 38 | let completion_start = Instant::now(); |
39 | let res = server.send_request::<Completion>(CompletionParams { | 39 | let res = server.send_request::<Completion>(CompletionParams { |
40 | text_document: server.doc_id("src/lib.rs"), | 40 | text_document_position: TextDocumentPositionParams::new( |
41 | server.doc_id("src/lib.rs"), | ||
42 | Position::new(0, 23), | ||
43 | ), | ||
41 | context: None, | 44 | context: None, |
42 | position: Position::new(0, 23), | ||
43 | }); | 45 | }); |
44 | assert!(format!("{}", res).contains("HashMap")); | 46 | assert!(format!("{}", res).contains("HashMap")); |
45 | eprintln!("completion took {:?}", completion_start.elapsed()); | 47 | eprintln!("completion took {:?}", completion_start.elapsed()); |