@@ -39,9 +39,9 @@ impl<'a> RequestDispatcher<'a> {
3939 f : fn ( & mut GlobalState , R :: Params ) -> Result < R :: Result > ,
4040 ) -> Result < & mut Self >
4141 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 ,
4545 {
4646 let ( id, params, panic_context) = match self . parse :: < R > ( ) {
4747 Some ( it) => it,
@@ -63,8 +63,8 @@ impl<'a> RequestDispatcher<'a> {
6363 ) -> Result < & mut Self >
6464 where
6565 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 ,
6868 {
6969 let ( id, params, panic_context) = match self . parse :: < R > ( ) {
7070 Some ( it) => it,
@@ -89,8 +89,8 @@ impl<'a> RequestDispatcher<'a> {
8989 ) -> & mut Self
9090 where
9191 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 ,
9494 {
9595 let ( id, params, panic_context) = match self . parse :: < R > ( ) {
9696 Some ( it) => it,
@@ -126,11 +126,11 @@ impl<'a> RequestDispatcher<'a> {
126126
127127 fn parse < R > ( & mut self ) -> Option < ( lsp_server:: RequestId , R :: Params , String ) >
128128 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 ,
131131 {
132132 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 ( ) ? ,
134134 _ => return None ,
135135 } ;
136136
@@ -159,9 +159,9 @@ fn thread_result_to_response<R>(
159159 result : thread:: Result < Result < R :: Result > > ,
160160) -> lsp_server:: Response
161161where
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 ,
165165{
166166 match result {
167167 Ok ( result) => result_to_response :: < R > ( id, result) ,
@@ -188,9 +188,9 @@ fn result_to_response<R>(
188188 result : Result < R :: Result > ,
189189) -> lsp_server:: Response
190190where
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 ,
194194{
195195 match result {
196196 Ok ( resp) => lsp_server:: Response :: new_ok ( id, & resp) ,
@@ -226,8 +226,8 @@ impl<'a> NotificationDispatcher<'a> {
226226 f : fn ( & mut GlobalState , N :: Params ) -> Result < ( ) > ,
227227 ) -> Result < & mut Self >
228228 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 ,
231231 {
232232 let not = match self . not . take ( ) {
233233 Some ( it) => it,
0 commit comments