From 8875f2c8aa9933b35854311256987abeece17f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Fri, 10 Sep 2021 19:34:47 +0300 Subject: [PATCH] Fix Cargo.toml change detection --- crates/rust-analyzer/src/global_state.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/rust-analyzer/src/global_state.rs b/crates/rust-analyzer/src/global_state.rs index 19ddd7c717d..6744bf62da8 100644 --- a/crates/rust-analyzer/src/global_state.rs +++ b/crates/rust-analyzer/src/global_state.rs @@ -186,9 +186,9 @@ impl GlobalState { } for file in changed_files { - if file.is_created_or_deleted() { - if let Some(path) = vfs.file_path(file.file_id).as_path() { - fs_changes.push((path.to_path_buf(), file.change_kind)); + if let Some(path) = vfs.file_path(file.file_id).as_path() { + fs_changes.push((path.to_path_buf(), file.change_kind)); + if file.is_created_or_deleted() { has_fs_changes = true; } }