From c7f02012b1e123665393ff0bc958c952fae46c89 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 20 Mar 2024 14:39:35 +0100 Subject: [PATCH] fix: Fix project discovery not checking whether the `Cargo.toml` actually exists --- crates/project-model/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/project-model/src/lib.rs b/crates/project-model/src/lib.rs index 51bb4fe303ac..28696aa32775 100644 --- a/crates/project-model/src/lib.rs +++ b/crates/project-model/src/lib.rs @@ -126,6 +126,7 @@ impl ProjectManifest { entities .filter_map(Result::ok) .map(|it| it.path().join("Cargo.toml")) + .filter(|it| it.exists()) .map(AbsPathBuf::try_from) .filter_map(|it| it.ok()?.try_into().ok()) .collect()