aboutsummaryrefslogtreecommitdiff
path: root/crates/gen_lsp_server
diff options
context:
space:
mode:
authorMarcus Klaas de Vries <[email protected]>2019-01-08 23:47:12 +0000
committerMarcus Klaas de Vries <[email protected]>2019-01-09 00:17:09 +0000
commit0b8fbb4fad97d2980f0070a23f5365a5ed887e2a (patch)
tree4e1cd7f26641c65d809e1a0a6943c77ccbe562d5 /crates/gen_lsp_server
parentf8261d611a60e99bc188022773f84912972208d2 (diff)
Fix typos in ARCHITECTURE.md and a number of crates
specifically: gen_lsp_server, ra_arena, ra_cli, ra_db, ra_hir
Diffstat (limited to 'crates/gen_lsp_server')
-rw-r--r--crates/gen_lsp_server/src/lib.rs6
-rw-r--r--crates/gen_lsp_server/src/msg.rs2
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/gen_lsp_server/src/lib.rs b/crates/gen_lsp_server/src/lib.rs
index b20652928..16ac799ac 100644
--- a/crates/gen_lsp_server/src/lib.rs
+++ b/crates/gen_lsp_server/src/lib.rs
@@ -78,10 +78,10 @@ pub use crate::{
78}; 78};
79 79
80/// Main entry point: runs the server from initialization to shutdown. 80/// Main entry point: runs the server from initialization to shutdown.
81/// To attach server to standard input/output streams, use `stdio_transport` 81/// To attach server to standard input/output streams, use the `stdio_transport`
82/// function to create corresponding `sender` and `receiver` pair. 82/// function to create corresponding `sender` and `receiver` pair.
83/// 83///
84///`server` should use `handle_shutdown` function to handle the `Shutdown` 84/// `server` should use the `handle_shutdown` function to handle the `Shutdown`
85/// request. 85/// request.
86pub fn run_server( 86pub fn run_server(
87 caps: ServerCapabilities, 87 caps: ServerCapabilities,
@@ -104,7 +104,7 @@ pub fn run_server(
104 Ok(()) 104 Ok(())
105} 105}
106 106
107/// if `req` is `Shutdown`, respond to it and return `None`, otherwise return `Some(req)` 107/// If `req` is `Shutdown`, respond to it and return `None`, otherwise return `Some(req)`
108pub fn handle_shutdown(req: RawRequest, sender: &Sender<RawMessage>) -> Option<RawRequest> { 108pub fn handle_shutdown(req: RawRequest, sender: &Sender<RawMessage>) -> Option<RawRequest> {
109 match req.cast::<Shutdown>() { 109 match req.cast::<Shutdown>() {
110 Ok((id, ())) => { 110 Ok((id, ())) => {
diff --git a/crates/gen_lsp_server/src/msg.rs b/crates/gen_lsp_server/src/msg.rs
index f68cbc541..94bef374c 100644
--- a/crates/gen_lsp_server/src/msg.rs
+++ b/crates/gen_lsp_server/src/msg.rs
@@ -54,7 +54,7 @@ pub enum ErrorCode {
54 ServerErrorEnd = -32000, 54 ServerErrorEnd = -32000,
55 ServerNotInitialized = -32002, 55 ServerNotInitialized = -32002,
56 UnknownErrorCode = -32001, 56 UnknownErrorCode = -32001,
57 RequestCancelled = -32800, 57 RequestCanceled = -32800,
58 ContentModified = -32801, 58 ContentModified = -32801,
59} 59}
60 60