mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-03 05:13:35 +00:00
Fix non-lsp compliant Response definition
This commit is contained in:
parent
8d75311400
commit
fc9a89dd19
4 changed files with 29 additions and 29 deletions
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "lsp-server"
|
||||
version = "0.7.8"
|
||||
version = "0.7.9"
|
||||
description = "Generic LSP server scaffold."
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/rust-lang/rust-analyzer/tree/master/lib/lsp-server"
|
||||
|
|
@ -16,9 +16,9 @@ crossbeam-channel.workspace = true
|
|||
[dev-dependencies]
|
||||
lsp-types = "=0.95"
|
||||
ctrlc = "3.4.7"
|
||||
anyhow.workspace = true
|
||||
anyhow.workspace = true
|
||||
rustc-hash.workspace = true
|
||||
toolchain.workspace = true
|
||||
toolchain.workspace = true
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
|
|
|||
|
|
@ -84,9 +84,9 @@ pub struct Response {
|
|||
// request id. We fail deserialization in that case, so we just
|
||||
// make this field mandatory.
|
||||
pub id: RequestId,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||
pub result: Option<serde_json::Value>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||
pub error: Option<ResponseError>,
|
||||
}
|
||||
|
||||
|
|
@ -94,7 +94,7 @@ pub struct Response {
|
|||
pub struct ResponseError {
|
||||
pub code: i32,
|
||||
pub message: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
#[serde(skip_serializing_if = "Option::is_none", default)]
|
||||
pub data: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue