@@ -196,7 +196,7 @@ impl GlobalState {
196196 ) {
197197 return Ok ( ( ) ) ;
198198 }
199- self . handle_event ( event) ? ;
199+ self . handle_event ( event) ;
200200 }
201201
202202 Err ( anyhow:: anyhow!( "A receiver has been dropped, something panicked!" ) )
@@ -278,7 +278,7 @@ impl GlobalState {
278278 . map ( Some )
279279 }
280280
281- fn handle_event ( & mut self , event : Event ) -> anyhow :: Result < ( ) > {
281+ fn handle_event ( & mut self , event : Event ) {
282282 let loop_start = Instant :: now ( ) ;
283283 let _p = tracing:: info_span!( "GlobalState::handle_event" , event = %event) . entered ( ) ;
284284
@@ -295,7 +295,7 @@ impl GlobalState {
295295 match event {
296296 Event :: Lsp ( msg) => match msg {
297297 lsp_server:: Message :: Request ( req) => self . on_new_request ( loop_start, req) ,
298- lsp_server:: Message :: Notification ( not) => self . on_notification ( not) ? ,
298+ lsp_server:: Message :: Notification ( not) => self . on_notification ( not) ,
299299 lsp_server:: Message :: Response ( resp) => self . complete_request ( resp) ,
300300 } ,
301301 Event :: QueuedTask ( task) => {
@@ -487,7 +487,6 @@ impl GlobalState {
487487 "overly long loop turn took {loop_duration:?} (event handling took {event_handling_duration:?}): {event_dbg_msg}"
488488 ) ) ;
489489 }
490- Ok ( ( ) )
491490 }
492491
493492 fn prime_caches ( & mut self , cause : String ) {
@@ -1116,37 +1115,32 @@ impl GlobalState {
11161115 }
11171116
11181117 /// Handles an incoming notification.
1119- fn on_notification ( & mut self , not : Notification ) -> anyhow :: Result < ( ) > {
1118+ fn on_notification ( & mut self , not : Notification ) {
11201119 let _p =
11211120 span ! ( Level :: INFO , "GlobalState::on_notification" , not. method = ?not. method) . entered ( ) ;
11221121 use crate :: handlers:: notification as handlers;
11231122 use lsp_types:: notification as notifs;
11241123
11251124 NotificationDispatcher { not : Some ( not) , global_state : self }
1126- . on_sync_mut :: < notifs:: Cancel > ( handlers:: handle_cancel) ?
1125+ . on_sync_mut :: < notifs:: Cancel > ( handlers:: handle_cancel)
11271126 . on_sync_mut :: < notifs:: WorkDoneProgressCancel > (
11281127 handlers:: handle_work_done_progress_cancel,
1129- ) ?
1130- . on_sync_mut :: < notifs:: DidOpenTextDocument > ( handlers:: handle_did_open_text_document) ?
1131- . on_sync_mut :: < notifs:: DidChangeTextDocument > (
1132- handlers:: handle_did_change_text_document,
1133- ) ?
1134- . on_sync_mut :: < notifs:: DidCloseTextDocument > ( handlers:: handle_did_close_text_document) ?
1135- . on_sync_mut :: < notifs:: DidSaveTextDocument > ( handlers:: handle_did_save_text_document) ?
1128+ )
1129+ . on_sync_mut :: < notifs:: DidOpenTextDocument > ( handlers:: handle_did_open_text_document)
1130+ . on_sync_mut :: < notifs:: DidChangeTextDocument > ( handlers:: handle_did_change_text_document)
1131+ . on_sync_mut :: < notifs:: DidCloseTextDocument > ( handlers:: handle_did_close_text_document)
1132+ . on_sync_mut :: < notifs:: DidSaveTextDocument > ( handlers:: handle_did_save_text_document)
11361133 . on_sync_mut :: < notifs:: DidChangeConfiguration > (
11371134 handlers:: handle_did_change_configuration,
1138- ) ?
1135+ )
11391136 . on_sync_mut :: < notifs:: DidChangeWorkspaceFolders > (
11401137 handlers:: handle_did_change_workspace_folders,
1141- ) ?
1142- . on_sync_mut :: < notifs:: DidChangeWatchedFiles > (
1143- handlers:: handle_did_change_watched_files,
1144- ) ?
1145- . on_sync_mut :: < lsp_ext:: CancelFlycheck > ( handlers:: handle_cancel_flycheck) ?
1146- . on_sync_mut :: < lsp_ext:: ClearFlycheck > ( handlers:: handle_clear_flycheck) ?
1147- . on_sync_mut :: < lsp_ext:: RunFlycheck > ( handlers:: handle_run_flycheck) ?
1148- . on_sync_mut :: < lsp_ext:: AbortRunTest > ( handlers:: handle_abort_run_test) ?
1138+ )
1139+ . on_sync_mut :: < notifs:: DidChangeWatchedFiles > ( handlers:: handle_did_change_watched_files)
1140+ . on_sync_mut :: < lsp_ext:: CancelFlycheck > ( handlers:: handle_cancel_flycheck)
1141+ . on_sync_mut :: < lsp_ext:: ClearFlycheck > ( handlers:: handle_clear_flycheck)
1142+ . on_sync_mut :: < lsp_ext:: RunFlycheck > ( handlers:: handle_run_flycheck)
1143+ . on_sync_mut :: < lsp_ext:: AbortRunTest > ( handlers:: handle_abort_run_test)
11491144 . finish ( ) ;
1150- Ok ( ( ) )
11511145 }
11521146}
0 commit comments