This commit is contained in:
Aleksey Kladov 2018-09-01 18:03:57 +03:00
parent 8f1ce82753
commit 4268fbeaa1
4 changed files with 38 additions and 54 deletions

View file

@ -1,6 +1,4 @@
use std::collections::HashMap;
use serde::{ser::Serialize, de::DeserializeOwned};
use languageserver_types::{TextDocumentIdentifier, Range, Url, Position, Location};
use url_serde;
@ -18,24 +16,6 @@ pub use languageserver_types::{
TextDocumentEdit,
};
pub trait ClientRequest: 'static {
type Params: DeserializeOwned + Send + 'static;
type Result: Serialize + Send + 'static;
const METHOD: &'static str;
}
impl<T> ClientRequest for T
where T: Request + 'static,
T::Params: DeserializeOwned + Send + 'static,
T::Result: Serialize + Send + 'static,
{
type Params = <T as Request>::Params;
type Result = <T as Request>::Result;
const METHOD: &'static str = <T as Request>::METHOD;
}
pub enum SyntaxTree {}
impl Request for SyntaxTree {