aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_cargo_watch/src/lib.rs13
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs1
2 files changed, 12 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
315impl WatchThread { 320impl 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(),
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index 7a49cad86..844259796 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -416,6 +416,7 @@ fn loop_turn(
416 if world_state.feature_flags().get("notifications.workspace-loaded") { 416 if world_state.feature_flags().get("notifications.workspace-loaded") {
417 let msg = format!("workspace loaded, {} rust packages", n_packages); 417 let msg = format!("workspace loaded, {} rust packages", n_packages);
418 show_message(req::MessageType::Info, msg, &connection.sender); 418 show_message(req::MessageType::Info, msg, &connection.sender);
419 world_state.check_watcher.update();
419 } 420 }
420 } 421 }
421 422