aboutsummaryrefslogtreecommitdiff
path: root/crates/server/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/server/src/main.rs')
-rw-r--r--crates/server/src/main.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/server/src/main.rs b/crates/server/src/main.rs
index 6af8bf81b..eeb343b80 100644
--- a/crates/server/src/main.rs
+++ b/crates/server/src/main.rs
@@ -84,14 +84,13 @@ fn initialize(io: &mut Io) -> Result<()> {
84 bail!("expected initialize request, got {:?}", res), 84 bail!("expected initialize request, got {:?}", res),
85 85
86 RawMsg::Request(req) => { 86 RawMsg::Request(req) => {
87 let mut req = Some(req); 87 let req = dispatch::handle_request::<req::Initialize, _>(req, |_params, resp| {
88 dispatch::handle_request::<req::Initialize, _>(&mut req, |_params, resp| {
89 let res = req::InitializeResult { capabilities: caps::server_capabilities() }; 88 let res = req::InitializeResult { capabilities: caps::server_capabilities() };
90 let resp = resp.into_response(Ok(res))?; 89 let resp = resp.into_response(Ok(res))?;
91 io.send(RawMsg::Response(resp)); 90 io.send(RawMsg::Response(resp));
92 Ok(()) 91 Ok(())
93 })?; 92 })?;
94 if let Some(req) = req { 93 if let Err(req) = req {
95 bail!("expected initialize request, got {:?}", req) 94 bail!("expected initialize request, got {:?}", req)
96 } 95 }
97 match io.recv()? { 96 match io.recv()? {