mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
cancelation
This commit is contained in:
parent
efa6a952b4
commit
d999f4b568
7 changed files with 119 additions and 60 deletions
|
@ -84,14 +84,13 @@ fn initialize(io: &mut Io) -> Result<()> {
|
|||
bail!("expected initialize request, got {:?}", res),
|
||||
|
||||
RawMsg::Request(req) => {
|
||||
let mut req = Some(req);
|
||||
dispatch::handle_request::<req::Initialize, _>(&mut req, |_params, resp| {
|
||||
let req = dispatch::handle_request::<req::Initialize, _>(req, |_params, resp| {
|
||||
let res = req::InitializeResult { capabilities: caps::server_capabilities() };
|
||||
let resp = resp.into_response(Ok(res))?;
|
||||
io.send(RawMsg::Response(resp));
|
||||
Ok(())
|
||||
})?;
|
||||
if let Some(req) = req {
|
||||
if let Err(req) = req {
|
||||
bail!("expected initialize request, got {:?}", req)
|
||||
}
|
||||
match io.recv()? {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue