diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-01-11 20:41:41 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-11 20:41:41 +0000 |
commit | 3924c7de505b591d3e1281857a61713fbe308d59 (patch) | |
tree | 2bab7953c6fb1d089ce2acaf7b646adc4921b128 /crates/ra_cargo_watch/src | |
parent | 867081220921c1c593f11866bbdba8b845090c07 (diff) | |
parent | 8e778f9842123e1f688a2632d99e439821801bd2 (diff) |
Merge #2791
2791: Slightly more robust cargo watcher root search r=kiljacken a=kiljacken
Fixes #2780 (hopefully).
Use the already painstakingly found `workspaces` instead of naively using `folder_roots` from editor.
Co-authored-by: Emil Lauridsen <[email protected]>
Diffstat (limited to 'crates/ra_cargo_watch/src')
-rw-r--r-- | crates/ra_cargo_watch/src/lib.rs | 6 |
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 { |