diff options
author | Aleksey Kladov <[email protected]> | 2018-08-10 22:01:37 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-10 22:01:37 +0100 |
commit | 46e4232cc69bc2e003dc8a14e604119bb36e9f9f (patch) | |
tree | eb49c33ec3e00c16b8959fbe55d035893e6e327b /crates/server | |
parent | 52de08330f5052a1f10c5d46e1352ca86b622d71 (diff) |
simplify bouds
Diffstat (limited to 'crates/server')
-rw-r--r-- | crates/server/src/dispatch.rs | 2 | ||||
-rw-r--r-- | crates/server/src/req.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/server/src/dispatch.rs b/crates/server/src/dispatch.rs index 6a609f10e..eb23ab64f 100644 --- a/crates/server/src/dispatch.rs +++ b/crates/server/src/dispatch.rs | |||
@@ -16,7 +16,7 @@ use ::{ | |||
16 | pub struct Responder<R: ClientRequest> { | 16 | pub struct Responder<R: ClientRequest> { |
17 | id: u64, | 17 | id: u64, |
18 | bomb: DropBomb, | 18 | bomb: DropBomb, |
19 | ph: PhantomData<R>, | 19 | ph: PhantomData<fn(R)>, |
20 | } | 20 | } |
21 | 21 | ||
22 | impl<R: ClientRequest> Responder<R> | 22 | impl<R: ClientRequest> Responder<R> |
diff --git a/crates/server/src/req.rs b/crates/server/src/req.rs index 10f0b2919..645a17306 100644 --- a/crates/server/src/req.rs +++ b/crates/server/src/req.rs | |||
@@ -7,14 +7,14 @@ pub use languageserver_types::{ | |||
7 | }; | 7 | }; |
8 | 8 | ||
9 | 9 | ||
10 | pub trait ClientRequest: Send + 'static { | 10 | pub trait ClientRequest: 'static { |
11 | type Params: DeserializeOwned + Send + 'static; | 11 | type Params: DeserializeOwned + Send + 'static; |
12 | type Result: Serialize + Send + 'static; | 12 | type Result: Serialize + Send + 'static; |
13 | const METHOD: &'static str; | 13 | const METHOD: &'static str; |
14 | } | 14 | } |
15 | 15 | ||
16 | impl<T> ClientRequest for T | 16 | impl<T> ClientRequest for T |
17 | where T: Request + Send + 'static, | 17 | where T: Request + 'static, |
18 | T::Params: DeserializeOwned + Send + 'static, | 18 | T::Params: DeserializeOwned + Send + 'static, |
19 | T::Result: Serialize + Send + 'static, | 19 | T::Result: Serialize + Send + 'static, |
20 | { | 20 | { |