aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_cargo_watch
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_cargo_watch')
-rw-r--r--crates/ra_cargo_watch/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_cargo_watch/src/lib.rs b/crates/ra_cargo_watch/src/lib.rs
index 9bc0fd405..cb0856aa4 100644
--- a/crates/ra_cargo_watch/src/lib.rs
+++ b/crates/ra_cargo_watch/src/lib.rs
@@ -58,6 +58,12 @@ impl CheckWatcher {
58 CheckWatcher { task_recv, cmd_send: Some(cmd_send), handle: Some(handle), shared } 58 CheckWatcher { task_recv, cmd_send: Some(cmd_send), handle: Some(handle), shared }
59 } 59 }
60 60
61 /// Returns a CheckWatcher that doesn't actually do anything
62 pub fn dummy() -> CheckWatcher {
63 let shared = Arc::new(RwLock::new(CheckWatcherSharedState::new()));
64 CheckWatcher { task_recv: never(), cmd_send: None, handle: None, shared }
65 }
66
61 /// Schedule a re-start of the cargo check worker. 67 /// Schedule a re-start of the cargo check worker.
62 pub fn update(&self) { 68 pub fn update(&self) {
63 if let Some(cmd_send) = &self.cmd_send { 69 if let Some(cmd_send) = &self.cmd_send {