From 3990d971e54b69949f26bbbc530fa22fdc2fcd7f Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 1 Apr 2020 11:09:19 +0200 Subject: Crisper name https://www.flycheck.org/en/latest/ --- crates/ra_flycheck/src/lib.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'crates/ra_flycheck/src') diff --git a/crates/ra_flycheck/src/lib.rs b/crates/ra_flycheck/src/lib.rs index b6bb9da4b..2990c1f95 100644 --- a/crates/ra_flycheck/src/lib.rs +++ b/crates/ra_flycheck/src/lib.rs @@ -29,27 +29,27 @@ pub struct CheckConfig { pub all_targets: bool, } -/// CheckWatcher wraps the shared state and communication machinery used for +/// Flycheck wraps the shared state and communication machinery used for /// running `cargo check` (or other compatible command) and providing /// diagnostics based on the output. /// The spawned thread is shut down when this struct is dropped. #[derive(Debug)] -pub struct CheckWatcher { +pub struct Flycheck { // XXX: drop order is significant cmd_send: Sender, handle: Option>, pub task_recv: Receiver, } -impl CheckWatcher { - pub fn new(config: CheckConfig, workspace_root: PathBuf) -> CheckWatcher { +impl Flycheck { + pub fn new(config: CheckConfig, workspace_root: PathBuf) -> Flycheck { let (task_send, task_recv) = unbounded::(); let (cmd_send, cmd_recv) = unbounded::(); let handle = jod_thread::spawn(move || { - let mut check = CheckWatcherThread::new(config, workspace_root); + let mut check = FlycheckThread::new(config, workspace_root); check.run(&task_send, &cmd_recv); }); - CheckWatcher { task_recv, cmd_send, handle: Some(handle) } + Flycheck { task_recv, cmd_send, handle: Some(handle) } } /// Schedule a re-start of the cargo check worker. @@ -75,7 +75,7 @@ pub enum CheckCommand { Update, } -struct CheckWatcherThread { +struct FlycheckThread { options: CheckConfig, workspace_root: PathBuf, last_update_req: Option, @@ -89,9 +89,9 @@ struct CheckWatcherThread { check_process: Option>, } -impl CheckWatcherThread { - fn new(options: CheckConfig, workspace_root: PathBuf) -> CheckWatcherThread { - CheckWatcherThread { +impl FlycheckThread { + fn new(options: CheckConfig, workspace_root: PathBuf) -> FlycheckThread { + FlycheckThread { options, workspace_root, last_update_req: None, -- cgit v1.2.3