File tree 2 files changed +6
-7
lines changed
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 3
3
//!
4
4
//! Each tick provides an immutable snapshot of the state as `WorldSnapshot`.
5
5
6
- use std:: sync:: Arc ;
6
+ use std:: { sync:: Arc , time :: Instant } ;
7
7
8
8
use crossbeam_channel:: { unbounded, Receiver , Sender } ;
9
9
use flycheck:: FlycheckHandle ;
@@ -20,7 +20,7 @@ use crate::{
20
20
diagnostics:: { CheckFixes , DiagnosticCollection } ,
21
21
from_proto,
22
22
line_endings:: LineEndings ,
23
- main_loop:: { ReqQueue , Task } ,
23
+ main_loop:: Task ,
24
24
reload:: SourceRootConfig ,
25
25
request_metrics:: { LatestRequests , RequestMetrics } ,
26
26
show_message,
@@ -48,6 +48,9 @@ pub(crate) struct Handle<H, C> {
48
48
pub ( crate ) receiver : C ,
49
49
}
50
50
51
+ pub ( crate ) type ReqHandler = fn ( & mut GlobalState , lsp_server:: Response ) ;
52
+ pub ( crate ) type ReqQueue = lsp_server:: ReqQueue < ( String , Instant ) , ReqHandler > ;
53
+
51
54
/// `GlobalState` is the primary mutable state of the language server
52
55
///
53
56
/// The most interesting components are `vfs`, which stores a consistent
Original file line number Diff line number Diff line change @@ -468,10 +468,6 @@ impl GlobalState {
468
468
}
469
469
}
470
470
471
- pub ( crate ) type ReqHandler = fn ( & mut GlobalState , Response ) ;
472
- pub ( crate ) type ReqQueue = lsp_server:: ReqQueue < ( String , Instant ) , ReqHandler > ;
473
- const DO_NOTHING : ReqHandler = |_, _| ( ) ;
474
-
475
471
#[ derive( Eq , PartialEq ) ]
476
472
enum Progress {
477
473
Begin ,
@@ -499,7 +495,7 @@ fn report_progress(
499
495
let work_done_progress_create = global_state. req_queue . outgoing . register (
500
496
lsp_types:: request:: WorkDoneProgressCreate :: METHOD . to_string ( ) ,
501
497
lsp_types:: WorkDoneProgressCreateParams { token : token. clone ( ) } ,
502
- DO_NOTHING ,
498
+ |_ , _| ( ) ,
503
499
) ;
504
500
global_state. send ( work_done_progress_create. into ( ) ) ;
505
501
You can’t perform that action at this time.
0 commit comments