aboutsummaryrefslogtreecommitdiff
path: root/crates/gen_lsp_server
diff options
context:
space:
mode:
authorMuhammad Mominul Huque <[email protected]>2019-06-15 08:53:37 +0100
committerMuhammad Mominul Huque <[email protected]>2019-06-15 08:53:37 +0100
commit125d6e74f71eb71199fe03ea7f6a42cf852a4de2 (patch)
treee5ec327f15532834b3d41f53ddbfc8067df56757 /crates/gen_lsp_server
parentebb40c7f87d58fb74c8f3b4dfcb2704140599d65 (diff)
Fix a doc test
Diffstat (limited to 'crates/gen_lsp_server')
-rw-r--r--crates/gen_lsp_server/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/gen_lsp_server/src/lib.rs b/crates/gen_lsp_server/src/lib.rs
index 8e7697ed4..7ecef83cb 100644
--- a/crates/gen_lsp_server/src/lib.rs
+++ b/crates/gen_lsp_server/src/lib.rs
@@ -5,11 +5,12 @@
5//! Run with `RUST_LOG=gen_lsp_server=debug` to see all the messages. 5//! Run with `RUST_LOG=gen_lsp_server=debug` to see all the messages.
6//! 6//!
7//! ```no_run 7//! ```no_run
8//! use std::error::Error;
8//! use crossbeam_channel::{Sender, Receiver}; 9//! use crossbeam_channel::{Sender, Receiver};
9//! use lsp_types::{ServerCapabilities, InitializeParams, request::{GotoDefinition, GotoDefinitionResponse}}; 10//! use lsp_types::{ServerCapabilities, InitializeParams, request::{GotoDefinition, GotoDefinitionResponse}};
10//! use gen_lsp_server::{run_server, stdio_transport, handle_shutdown, RawMessage, RawResponse}; 11//! use gen_lsp_server::{run_server, stdio_transport, handle_shutdown, RawMessage, RawResponse};
11//! 12//!
12//! fn main() -> Result<(), failure::Error> { 13//! fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
13//! let (receiver, sender, io_threads) = stdio_transport(); 14//! let (receiver, sender, io_threads) = stdio_transport();
14//! run_server( 15//! run_server(
15//! ServerCapabilities::default(), 16//! ServerCapabilities::default(),
@@ -25,7 +26,7 @@
25//! _params: InitializeParams, 26//! _params: InitializeParams,
26//! receiver: &Receiver<RawMessage>, 27//! receiver: &Receiver<RawMessage>,
27//! sender: &Sender<RawMessage>, 28//! sender: &Sender<RawMessage>,
28//! ) -> Result<(), failure::Error> { 29//! ) -> Result<(), Box<dyn Error + Send + Sync>> {
29//! for msg in receiver { 30//! for msg in receiver {
30//! match msg { 31//! match msg {
31//! RawMessage::Request(req) => { 32//! RawMessage::Request(req) => {