diff options
author | Aleksey Kladov <[email protected]> | 2018-09-01 16:03:57 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-09-01 16:03:57 +0100 |
commit | 4268fbeaa1e9f98e033c72afce5dc8333da4b4b7 (patch) | |
tree | 7822fe514b00b84893d981b75aef2725030dd376 /crates/gen_lsp_server/src | |
parent | 8f1ce8275347e915b1cc824567e96369875cefd4 (diff) |
simplify
Diffstat (limited to 'crates/gen_lsp_server/src')
-rw-r--r-- | crates/gen_lsp_server/src/lib.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/gen_lsp_server/src/lib.rs b/crates/gen_lsp_server/src/lib.rs index b47db0df4..476c12cc1 100644 --- a/crates/gen_lsp_server/src/lib.rs +++ b/crates/gen_lsp_server/src/lib.rs | |||
@@ -25,11 +25,9 @@ pub use { | |||
25 | stdio::{stdio_transport, Threads}, | 25 | stdio::{stdio_transport, Threads}, |
26 | }; | 26 | }; |
27 | 27 | ||
28 | pub type LspServer = fn(&mut Receiver<RawMessage>, &mut Sender<RawMessage>) -> Result<()>; | ||
29 | |||
30 | pub fn run_server( | 28 | pub fn run_server( |
31 | caps: ServerCapabilities, | 29 | caps: ServerCapabilities, |
32 | server: LspServer, | 30 | server: impl FnOnce(&mut Receiver<RawMessage>, &mut Sender<RawMessage>) -> Result<()>, |
33 | mut receiver: Receiver<RawMessage>, | 31 | mut receiver: Receiver<RawMessage>, |
34 | mut sender: Sender<RawMessage>, | 32 | mut sender: Sender<RawMessage>, |
35 | ) -> Result<()> { | 33 | ) -> Result<()> { |