@@ -39,9 +39,9 @@ impl<'a> RequestDispatcher<'a> {
39
39
f : fn ( & mut GlobalState , R :: Params ) -> Result < R :: Result > ,
40
40
) -> Result < & mut Self >
41
41
where
42
- R : lsp_types:: request:: Request + ' static ,
43
- R :: Params : DeserializeOwned + panic:: UnwindSafe + fmt:: Debug + ' static ,
44
- R :: Result : Serialize + ' static ,
42
+ R : lsp_types:: request:: Request ,
43
+ R :: Params : DeserializeOwned + panic:: UnwindSafe + fmt:: Debug ,
44
+ R :: Result : Serialize ,
45
45
{
46
46
let ( id, params, panic_context) = match self . parse :: < R > ( ) {
47
47
Some ( it) => it,
@@ -63,8 +63,8 @@ impl<'a> RequestDispatcher<'a> {
63
63
) -> Result < & mut Self >
64
64
where
65
65
R : lsp_types:: request:: Request + ' static ,
66
- R :: Params : DeserializeOwned + panic:: UnwindSafe + fmt:: Debug + ' static ,
67
- R :: Result : Serialize + ' static ,
66
+ R :: Params : DeserializeOwned + panic:: UnwindSafe + fmt:: Debug ,
67
+ R :: Result : Serialize ,
68
68
{
69
69
let ( id, params, panic_context) = match self . parse :: < R > ( ) {
70
70
Some ( it) => it,
@@ -89,8 +89,8 @@ impl<'a> RequestDispatcher<'a> {
89
89
) -> & mut Self
90
90
where
91
91
R : lsp_types:: request:: Request + ' static ,
92
- R :: Params : DeserializeOwned + panic:: UnwindSafe + Send + fmt:: Debug + ' static ,
93
- R :: Result : Serialize + ' static ,
92
+ R :: Params : DeserializeOwned + panic:: UnwindSafe + Send + fmt:: Debug ,
93
+ R :: Result : Serialize ,
94
94
{
95
95
let ( id, params, panic_context) = match self . parse :: < R > ( ) {
96
96
Some ( it) => it,
@@ -126,11 +126,11 @@ impl<'a> RequestDispatcher<'a> {
126
126
127
127
fn parse < R > ( & mut self ) -> Option < ( lsp_server:: RequestId , R :: Params , String ) >
128
128
where
129
- R : lsp_types:: request:: Request + ' static ,
130
- R :: Params : DeserializeOwned + fmt:: Debug + ' static ,
129
+ R : lsp_types:: request:: Request ,
130
+ R :: Params : DeserializeOwned + fmt:: Debug ,
131
131
{
132
132
let req = match & self . req {
133
- Some ( req) if req. method == R :: METHOD => self . req . take ( ) . unwrap ( ) ,
133
+ Some ( req) if req. method == R :: METHOD => self . req . take ( ) ? ,
134
134
_ => return None ,
135
135
} ;
136
136
@@ -159,9 +159,9 @@ fn thread_result_to_response<R>(
159
159
result : thread:: Result < Result < R :: Result > > ,
160
160
) -> lsp_server:: Response
161
161
where
162
- R : lsp_types:: request:: Request + ' static ,
163
- R :: Params : DeserializeOwned + ' static ,
164
- R :: Result : Serialize + ' static ,
162
+ R : lsp_types:: request:: Request ,
163
+ R :: Params : DeserializeOwned ,
164
+ R :: Result : Serialize ,
165
165
{
166
166
match result {
167
167
Ok ( result) => result_to_response :: < R > ( id, result) ,
@@ -188,9 +188,9 @@ fn result_to_response<R>(
188
188
result : Result < R :: Result > ,
189
189
) -> lsp_server:: Response
190
190
where
191
- R : lsp_types:: request:: Request + ' static ,
192
- R :: Params : DeserializeOwned + ' static ,
193
- R :: Result : Serialize + ' static ,
191
+ R : lsp_types:: request:: Request ,
192
+ R :: Params : DeserializeOwned ,
193
+ R :: Result : Serialize ,
194
194
{
195
195
match result {
196
196
Ok ( resp) => lsp_server:: Response :: new_ok ( id, & resp) ,
@@ -226,8 +226,8 @@ impl<'a> NotificationDispatcher<'a> {
226
226
f : fn ( & mut GlobalState , N :: Params ) -> Result < ( ) > ,
227
227
) -> Result < & mut Self >
228
228
where
229
- N : lsp_types:: notification:: Notification + ' static ,
230
- N :: Params : DeserializeOwned + Send + ' static ,
229
+ N : lsp_types:: notification:: Notification ,
230
+ N :: Params : DeserializeOwned + Send ,
231
231
{
232
232
let not = match self . not . take ( ) {
233
233
Some ( it) => it,
0 commit comments