File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 33//!
44//! Each tick provides an immutable snapshot of the state as `WorldSnapshot`.
55
6- use std:: sync:: Arc ;
6+ use std:: { sync:: Arc , time :: Instant } ;
77
88use crossbeam_channel:: { unbounded, Receiver , Sender } ;
99use flycheck:: FlycheckHandle ;
@@ -20,7 +20,7 @@ use crate::{
2020 diagnostics:: { CheckFixes , DiagnosticCollection } ,
2121 from_proto,
2222 line_endings:: LineEndings ,
23- main_loop:: { ReqQueue , Task } ,
23+ main_loop:: Task ,
2424 reload:: SourceRootConfig ,
2525 request_metrics:: { LatestRequests , RequestMetrics } ,
2626 show_message,
@@ -48,6 +48,9 @@ pub(crate) struct Handle<H, C> {
4848 pub ( crate ) receiver : C ,
4949}
5050
51+ pub ( crate ) type ReqHandler = fn ( & mut GlobalState , lsp_server:: Response ) ;
52+ pub ( crate ) type ReqQueue = lsp_server:: ReqQueue < ( String , Instant ) , ReqHandler > ;
53+
5154/// `GlobalState` is the primary mutable state of the language server
5255///
5356/// 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 {
468468 }
469469}
470470
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-
475471#[ derive( Eq , PartialEq ) ]
476472enum Progress {
477473 Begin ,
@@ -499,7 +495,7 @@ fn report_progress(
499495 let work_done_progress_create = global_state. req_queue . outgoing . register (
500496 lsp_types:: request:: WorkDoneProgressCreate :: METHOD . to_string ( ) ,
501497 lsp_types:: WorkDoneProgressCreateParams { token : token. clone ( ) } ,
502- DO_NOTHING ,
498+ |_ , _| ( ) ,
503499 ) ;
504500 global_state. send ( work_done_progress_create. into ( ) ) ;
505501
You can’t perform that action at this time.
0 commit comments