From a931fb1ef633473e272bb3f9ba86968dd90f44a7 Mon Sep 17 00:00:00 2001 From: Muhammad Mominul Huque Date: Sat, 15 Jun 2019 01:03:17 +0600 Subject: Get rid of failure: gen_lsp_server --- crates/gen_lsp_server/examples/01_gen_lsp_server.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'crates/gen_lsp_server/examples/01_gen_lsp_server.rs') diff --git a/crates/gen_lsp_server/examples/01_gen_lsp_server.rs b/crates/gen_lsp_server/examples/01_gen_lsp_server.rs index 60c581075..bc497f74a 100644 --- a/crates/gen_lsp_server/examples/01_gen_lsp_server.rs +++ b/crates/gen_lsp_server/examples/01_gen_lsp_server.rs @@ -1,3 +1,5 @@ +use std::error::Error; + use crossbeam_channel::{Sender, Receiver}; use lsp_types::{ ServerCapabilities, InitializeParams, @@ -5,7 +7,7 @@ use lsp_types::{ }; use gen_lsp_server::{run_server, stdio_transport, handle_shutdown, RawMessage, RawResponse}; -fn main() -> Result<(), failure::Error> { +fn main() -> Result<(), Box> { let (receiver, sender, io_threads) = stdio_transport(); run_server(ServerCapabilities::default(), receiver, sender, main_loop)?; io_threads.join()?; @@ -16,7 +18,7 @@ fn main_loop( _params: InitializeParams, receiver: &Receiver, sender: &Sender, -) -> Result<(), failure::Error> { +) -> Result<(), Box> { for msg in receiver { match msg { RawMessage::Request(req) => { -- cgit v1.2.3