From aeed8f89a3df962fd2fe9642c1060b9e40bd5b50 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/crates/rust-analyzer/src/handlers/notification.rs b/crates/rust-analyzer/src/handlers/notification.rs index 49b1ba32a7..bb03eb3c89 100644 --- a/crates/rust-analyzer/src/handlers/notification.rs +++ b/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)),