@@ -97,22 +97,6 @@ impl fmt::Debug for Event {
97
97
}
98
98
99
99
impl GlobalState {
100
- fn next_event ( & self , inbox : & Receiver < lsp_server:: Message > ) -> Option < Event > {
101
- select ! {
102
- recv( inbox) -> msg =>
103
- msg. ok( ) . map( Event :: Lsp ) ,
104
-
105
- recv( self . task_pool. receiver) -> task =>
106
- Some ( Event :: Task ( task. unwrap( ) ) ) ,
107
-
108
- recv( self . loader. receiver) -> task =>
109
- Some ( Event :: Vfs ( task. unwrap( ) ) ) ,
110
-
111
- recv( self . flycheck_receiver) -> task =>
112
- Some ( Event :: Flycheck ( task. unwrap( ) ) ) ,
113
- }
114
- }
115
-
116
100
fn run ( mut self , inbox : Receiver < lsp_server:: Message > ) -> Result < ( ) > {
117
101
if self . config . linked_projects . is_empty ( ) && self . config . notifications . cargo_toml_not_found
118
102
{
@@ -169,6 +153,22 @@ impl GlobalState {
169
153
Err ( "client exited without proper shutdown sequence" ) ?
170
154
}
171
155
156
+ fn next_event ( & self , inbox : & Receiver < lsp_server:: Message > ) -> Option < Event > {
157
+ select ! {
158
+ recv( inbox) -> msg =>
159
+ msg. ok( ) . map( Event :: Lsp ) ,
160
+
161
+ recv( self . task_pool. receiver) -> task =>
162
+ Some ( Event :: Task ( task. unwrap( ) ) ) ,
163
+
164
+ recv( self . loader. receiver) -> task =>
165
+ Some ( Event :: Vfs ( task. unwrap( ) ) ) ,
166
+
167
+ recv( self . flycheck_receiver) -> task =>
168
+ Some ( Event :: Flycheck ( task. unwrap( ) ) ) ,
169
+ }
170
+ }
171
+
172
172
fn handle_event ( & mut self , event : Event ) -> Result < ( ) > {
173
173
let loop_start = Instant :: now ( ) ;
174
174
// NOTE: don't count blocking select! call as a loop-turn time
0 commit comments