@@ -196,7 +196,7 @@ impl GlobalState {
196
196
) {
197
197
return Ok ( ( ) ) ;
198
198
}
199
- self . handle_event ( event) ? ;
199
+ self . handle_event ( event) ;
200
200
}
201
201
202
202
Err ( anyhow:: anyhow!( "A receiver has been dropped, something panicked!" ) )
@@ -278,7 +278,7 @@ impl GlobalState {
278
278
. map ( Some )
279
279
}
280
280
281
- fn handle_event ( & mut self , event : Event ) -> anyhow :: Result < ( ) > {
281
+ fn handle_event ( & mut self , event : Event ) {
282
282
let loop_start = Instant :: now ( ) ;
283
283
let _p = tracing:: info_span!( "GlobalState::handle_event" , event = %event) . entered ( ) ;
284
284
@@ -295,7 +295,7 @@ impl GlobalState {
295
295
match event {
296
296
Event :: Lsp ( msg) => match msg {
297
297
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) ,
299
299
lsp_server:: Message :: Response ( resp) => self . complete_request ( resp) ,
300
300
} ,
301
301
Event :: QueuedTask ( task) => {
@@ -487,7 +487,6 @@ impl GlobalState {
487
487
"overly long loop turn took {loop_duration:?} (event handling took {event_handling_duration:?}): {event_dbg_msg}"
488
488
) ) ;
489
489
}
490
- Ok ( ( ) )
491
490
}
492
491
493
492
fn prime_caches ( & mut self , cause : String ) {
@@ -1116,37 +1115,32 @@ impl GlobalState {
1116
1115
}
1117
1116
1118
1117
/// Handles an incoming notification.
1119
- fn on_notification ( & mut self , not : Notification ) -> anyhow :: Result < ( ) > {
1118
+ fn on_notification ( & mut self , not : Notification ) {
1120
1119
let _p =
1121
1120
span ! ( Level :: INFO , "GlobalState::on_notification" , not. method = ?not. method) . entered ( ) ;
1122
1121
use crate :: handlers:: notification as handlers;
1123
1122
use lsp_types:: notification as notifs;
1124
1123
1125
1124
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)
1127
1126
. on_sync_mut :: < notifs:: WorkDoneProgressCancel > (
1128
1127
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)
1136
1133
. on_sync_mut :: < notifs:: DidChangeConfiguration > (
1137
1134
handlers:: handle_did_change_configuration,
1138
- ) ?
1135
+ )
1139
1136
. on_sync_mut :: < notifs:: DidChangeWorkspaceFolders > (
1140
1137
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)
1149
1144
. finish ( ) ;
1150
- Ok ( ( ) )
1151
1145
}
1152
1146
}
0 commit comments