Skip to content

Commit 5b41f8d

Browse files
committed
Bump lsp-server crate
1 parent c702da5 commit 5b41f8d

4 files changed

Lines changed: 14 additions & 20 deletions

File tree

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license = "MIT"
1111
clap = { version = "4.5.16", features = [ "wrap_help" ] }
1212
crossterm = "0.29"
1313
ignore = "0.4"
14-
lsp-server = "0.9.0"
14+
lsp-server = "0.10.0"
1515
lsp-types = "0.97"
1616
owo-colors = "4"
1717
regex = "1.11.1"

src/editor/server.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,7 @@ fn offset_to_position(text: &str, offset: usize) -> Position {
899899
#[cfg(test)]
900900
mod tests {
901901
use super::*;
902-
use lsp_server::{ErrorCode, RequestId, ResponseKind};
902+
use lsp_server::{ErrorCode, RequestId};
903903
use lsp_types::TextDocumentItem;
904904
use std::cell::RefCell;
905905
use std::convert::Infallible;
@@ -937,11 +937,11 @@ mod tests {
937937
match &messages[0] {
938938
Message::Response(response) => {
939939
assert_eq!(response.id, RequestId::from(1));
940-
match &response.response_kind {
941-
ResponseKind::Err { error } => {
940+
match &response.response_result {
941+
Err(error) => {
942942
assert_eq!(error.code, ErrorCode::MethodNotFound as i32);
943943
}
944-
ResponseKind::Ok { .. } => panic!("expected an error response"),
944+
Ok(..) => panic!("expected an error response"),
945945
}
946946
}
947947
_ => panic!("expected a Response message"),
@@ -965,9 +965,9 @@ mod tests {
965965
match &messages[0] {
966966
Message::Response(response) => {
967967
assert_eq!(response.id, RequestId::from(2));
968-
match &response.response_kind {
969-
ResponseKind::Ok { result } => assert_eq!(*result, Value::Null),
970-
ResponseKind::Err { .. } => panic!("expected an ok response"),
968+
match &response.response_result {
969+
Ok(result) => assert_eq!(*result, Value::Null),
970+
Err(..) => panic!("expected an ok response"),
971971
}
972972
}
973973
_ => panic!("expected a Response message"),
@@ -1050,8 +1050,8 @@ mod tests {
10501050
let messages = messages.into_inner();
10511051
assert_eq!(messages.len(), 1);
10521052
match &messages[0] {
1053-
Message::Response(response) => match &response.response_kind {
1054-
ResponseKind::Ok { result } => {
1053+
Message::Response(response) => match &response.response_result {
1054+
Ok(result) => {
10551055
let symbols: Option<Vec<SymbolInformation>> =
10561056
from_value(result.clone()).unwrap();
10571057
let symbols = symbols.unwrap();
@@ -1063,7 +1063,7 @@ mod tests {
10631063
.starts_with("making_coffee"))
10641064
);
10651065
}
1066-
ResponseKind::Err { .. } => panic!("expected an ok response"),
1066+
Err(..) => panic!("expected an ok response"),
10671067
},
10681068
_ => panic!("expected a Response message"),
10691069
}

src/parsing/parser.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1708,13 +1708,7 @@ impl<'i> Parser<'i> {
17081708
_ => err,
17091709
})?;
17101710
let span = self.span_since(start);
1711-
Ok(Expression::Multiline(
1712-
Multiline {
1713-
language,
1714-
lines,
1715-
},
1716-
span,
1717-
))
1711+
Ok(Expression::Multiline(Multiline { language, lines }, span))
17181712
} else if is_numeric(content) {
17191713
let numeric = self.read_numeric()?;
17201714
let span = self.span_since(start);

0 commit comments

Comments
 (0)