diff options
Diffstat (limited to 'crates/ra_cargo_watch')
-rw-r--r-- | crates/ra_cargo_watch/src/lib.rs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/crates/ra_cargo_watch/src/lib.rs b/crates/ra_cargo_watch/src/lib.rs index cb0856aa4..20fa5a924 100644 --- a/crates/ra_cargo_watch/src/lib.rs +++ b/crates/ra_cargo_watch/src/lib.rs | |||
@@ -184,8 +184,13 @@ impl CheckWatcherState { | |||
184 | workspace_root: PathBuf, | 184 | workspace_root: PathBuf, |
185 | shared: Arc<RwLock<CheckWatcherSharedState>>, | 185 | shared: Arc<RwLock<CheckWatcherSharedState>>, |
186 | ) -> CheckWatcherState { | 186 | ) -> CheckWatcherState { |
187 | let watcher = WatchThread::new(&options, &workspace_root); | 187 | CheckWatcherState { |
188 | CheckWatcherState { options, workspace_root, watcher, last_update_req: None, shared } | 188 | options, |
189 | workspace_root, | ||
190 | watcher: WatchThread::dummy(), | ||
191 | last_update_req: None, | ||
192 | shared, | ||
193 | } | ||
189 | } | 194 | } |
190 | 195 | ||
191 | fn run(&mut self, task_send: &Sender<CheckTask>, cmd_recv: &Receiver<CheckCommand>) { | 196 | fn run(&mut self, task_send: &Sender<CheckTask>, cmd_recv: &Receiver<CheckCommand>) { |
@@ -313,6 +318,10 @@ enum CheckEvent { | |||
313 | } | 318 | } |
314 | 319 | ||
315 | impl WatchThread { | 320 | impl WatchThread { |
321 | fn dummy() -> WatchThread { | ||
322 | WatchThread { handle: None, message_recv: never() } | ||
323 | } | ||
324 | |||
316 | fn new(options: &CheckOptions, workspace_root: &PathBuf) -> WatchThread { | 325 | fn new(options: &CheckOptions, workspace_root: &PathBuf) -> WatchThread { |
317 | let mut args: Vec<String> = vec![ | 326 | let mut args: Vec<String> = vec![ |
318 | options.command.clone(), | 327 | options.command.clone(), |