From 99de8516f983b5fbaedb89320b1d08744f802050 Mon Sep 17 00:00:00 2001 From: Ali Bektas Date: Fri, 27 Sep 2024 02:40:53 +0200 Subject: [PATCH] minor: Require both the existence of a target and check_workspace to be false to restart package-wide flycheck --- .../crates/rust-analyzer/src/handlers/notification.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/notification.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/notification.rs index 49b1ba32a795..bb03eb3c89b0 100644 --- a/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/notification.rs +++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/handlers/notification.rs @@ -380,7 +380,7 @@ fn run_flycheck(state: &mut GlobalState, vfs_path: VfsPath) -> bool { if id == flycheck.id() { updated = true; match package.filter(|_| { - !world.config.flycheck_workspace(source_root_id) || target.is_some() + !world.config.flycheck_workspace(source_root_id) && target.is_some() }) { Some(package) => flycheck .restart_for_package(package, target.clone().map(TupleExt::head)),