File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -157,12 +157,9 @@ impl FlycheckActor {
157
157
while let Some ( event) = self . next_event ( & inbox) {
158
158
match event {
159
159
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 ( ) ;
164
162
while let Ok ( Restart ) = inbox. recv_timeout ( Duration :: from_millis ( 50 ) ) { }
165
- self . progress ( Progress :: DidCancel ) ;
166
163
167
164
let command = self . check_command ( ) ;
168
165
tracing:: debug!( ?command, "will restart flycheck" ) ;
@@ -221,6 +218,7 @@ impl FlycheckActor {
221
218
self . progress ( Progress :: DidCancel ) ;
222
219
}
223
220
}
221
+
224
222
fn check_command ( & self ) -> Command {
225
223
let mut cmd = match & self . config {
226
224
FlycheckConfig :: CargoCommand {
You can’t perform that action at this time.
0 commit comments