mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 05:53:45 +00:00
minor: bump lsp-server version
This commit is contained in:
parent
b8ed4a388c
commit
2d445de170
4 changed files with 13 additions and 5 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -869,9 +869,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lsp-server"
|
name = "lsp-server"
|
||||||
version = "0.5.2"
|
version = "0.6.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c351c75989da23b355226dc188dc2b52538a7f4f218d70fd7393c6b62b110444"
|
checksum = "f70570c1c29cf6654029b8fe201a5507c153f0d85be6f234d471d756bc36775a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"log",
|
"log",
|
||||||
|
|
|
@ -33,7 +33,7 @@ threadpool = "1.8.1"
|
||||||
rayon = "1.5.1"
|
rayon = "1.5.1"
|
||||||
num_cpus = "1.13.1"
|
num_cpus = "1.13.1"
|
||||||
mimalloc = { version = "0.1.28", default-features = false, optional = true }
|
mimalloc = { version = "0.1.28", default-features = false, optional = true }
|
||||||
lsp-server = "0.5.2"
|
lsp-server = "0.6.0"
|
||||||
tracing = "0.1.32"
|
tracing = "0.1.32"
|
||||||
tracing-subscriber = { version = "0.3.9", default-features = false, features = [
|
tracing-subscriber = { version = "0.3.9", default-features = false, features = [
|
||||||
"env-filter",
|
"env-filter",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
//! See [RequestDispatcher].
|
//! See [RequestDispatcher].
|
||||||
use std::{fmt, panic, thread};
|
use std::{fmt, panic, thread};
|
||||||
|
|
||||||
|
use lsp_server::ExtractError;
|
||||||
use serde::{de::DeserializeOwned, Serialize};
|
use serde::{de::DeserializeOwned, Serialize};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -234,7 +235,10 @@ impl<'a> NotificationDispatcher<'a> {
|
||||||
};
|
};
|
||||||
let params = match not.extract::<N::Params>(N::METHOD) {
|
let params = match not.extract::<N::Params>(N::METHOD) {
|
||||||
Ok(it) => it,
|
Ok(it) => it,
|
||||||
Err(not) => {
|
Err(ExtractError::JsonError { method, error }) => {
|
||||||
|
panic!("Invalid request\nMethod: {method}\n error: {error}",)
|
||||||
|
}
|
||||||
|
Err(ExtractError::MethodMismatch(not)) => {
|
||||||
self.not = Some(not);
|
self.not = Some(not);
|
||||||
return Ok(self);
|
return Ok(self);
|
||||||
}
|
}
|
||||||
|
|
|
@ -256,7 +256,11 @@ impl GlobalState {
|
||||||
self.send(request.into());
|
self.send(request.into());
|
||||||
}
|
}
|
||||||
pub(crate) fn complete_request(&mut self, response: lsp_server::Response) {
|
pub(crate) fn complete_request(&mut self, response: lsp_server::Response) {
|
||||||
let handler = self.req_queue.outgoing.complete(response.id.clone());
|
let handler = self
|
||||||
|
.req_queue
|
||||||
|
.outgoing
|
||||||
|
.complete(response.id.clone())
|
||||||
|
.expect("received response for unknown request");
|
||||||
handler(self, response)
|
handler(self, response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue