Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'lib/lsp-server/src/lib.rs')
-rw-r--r--lib/lsp-server/src/lib.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/lsp-server/src/lib.rs b/lib/lsp-server/src/lib.rs
index cef1c3e140..66ecbf8c33 100644
--- a/lib/lsp-server/src/lib.rs
+++ b/lib/lsp-server/src/lib.rs
@@ -379,10 +379,9 @@ impl Connection {
#[cfg(test)]
mod tests {
use crossbeam_channel::unbounded;
- use lsp_types::{
- ExitNotification, InitializeParams, InitializeRequest, InitializedNotification,
- InitializedParams, Notification as _, Request as _,
- };
+ use lsp_types::notification::{Exit, Initialized, Notification};
+ use lsp_types::request::{Initialize, Request};
+ use lsp_types::{InitializeParams, InitializedParams};
use serde_json::to_value;
use crate::{Connection, Message, ProtocolError, RequestId};
@@ -410,7 +409,7 @@ mod tests {
#[test]
fn not_exit_notification() {
let notification = crate::Notification {
- method: InitializedNotification::METHOD.to_string(),
+ method: Initialized::METHOD.to_owned(),
params: to_value(InitializedParams {}).unwrap(),
};
@@ -418,7 +417,7 @@ mod tests {
let req_id = RequestId::from(234);
let request = crate::Request {
id: req_id.clone(),
- method: InitializeRequest::METHOD.to_string(),
+ method: Initialize::METHOD.to_owned(),
params: params_as_value.clone(),
};
@@ -430,10 +429,8 @@ mod tests {
#[test]
fn exit_notification() {
- let notification = crate::Notification {
- method: ExitNotification::METHOD.to_string(),
- params: to_value(()).unwrap(),
- };
+ let notification =
+ crate::Notification { method: Exit::METHOD.to_owned(), params: to_value(()).unwrap() };
let notification_msg = Message::from(notification);
initialize_start_test(TestCase {