This commit is contained in:
Aleksey Kladov 2020-06-26 17:17:38 +02:00
parent 9d15e8fc4f
commit de7b248227
2 changed files with 2 additions and 12 deletions

View file

@ -12,13 +12,13 @@ use parking_lot::RwLock;
use ra_db::{CrateId, VfsPath};
use ra_ide::{Analysis, AnalysisChange, AnalysisHost, FileId};
use ra_project_model::{CargoWorkspace, ProcMacroClient, ProjectWorkspace, Target};
use rustc_hash::{FxHashMap, FxHashSet};
use crate::{
config::Config,
diagnostics::{CheckFixes, DiagnosticCollection},
from_proto,
line_endings::LineEndings,
lsp_utils::notification_new,
main_loop::Task,
reload::SourceRootConfig,
request_metrics::{LatestRequests, RequestMetrics},
@ -26,7 +26,6 @@ use crate::{
to_proto::url_from_abs_path,
Result,
};
use rustc_hash::{FxHashMap, FxHashSet};
#[derive(Eq, PartialEq)]
pub(crate) enum Status {
@ -190,7 +189,7 @@ impl GlobalState {
&mut self,
params: N::Params,
) {
let not = notification_new::<N>(params);
let not = lsp_server::Notification::new(N::METHOD.to_string(), params);
self.send(not.into());
}

View file

@ -4,7 +4,6 @@ use std::{error::Error, ops::Range};
use lsp_server::Notification;
use ra_db::Canceled;
use ra_ide::LineIndex;
use serde::Serialize;
use crate::{from_proto, global_state::GlobalState};
@ -18,14 +17,6 @@ pub(crate) fn notification_is<N: lsp_types::notification::Notification>(
notification.method == N::METHOD
}
pub(crate) fn notification_new<N>(params: N::Params) -> Notification
where
N: lsp_types::notification::Notification,
N::Params: Serialize,
{
Notification::new(N::METHOD.to_string(), params)
}
#[derive(Debug, Eq, PartialEq)]
pub(crate) enum Progress {
Begin,