File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -157,12 +157,9 @@ impl FlycheckActor {
157157 while let Some ( event) = self . next_event ( & inbox) {
158158 match event {
159159 Event :: Restart ( Restart ) => {
160- if let Some ( cargo_handle) = self . cargo_handle . take ( ) {
161- // Cancel the previously spawned process
162- cargo_handle. cancel ( ) ;
163- }
160+ // Cancel the previously spawned process
161+ self . cancel_check_process ( ) ;
164162 while let Ok ( Restart ) = inbox. recv_timeout ( Duration :: from_millis ( 50 ) ) { }
165- self . progress ( Progress :: DidCancel ) ;
166163
167164 let command = self . check_command ( ) ;
168165 tracing:: debug!( ?command, "will restart flycheck" ) ;
@@ -221,6 +218,7 @@ impl FlycheckActor {
221218 self . progress ( Progress :: DidCancel ) ;
222219 }
223220 }
221+
224222 fn check_command ( & self ) -> Command {
225223 let mut cmd = match & self . config {
226224 FlycheckConfig :: CargoCommand {
You can’t perform that action at this time.
0 commit comments