Unnamed repository; edit this file 'description' to name the repository.
fix: Fix project discovery not checking whether the `Cargo.toml` actually exists
Lukas Wirth 2024-03-20
parent 6fce1d7 · commit c7f0201
-rw-r--r--crates/project-model/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/project-model/src/lib.rs b/crates/project-model/src/lib.rs
index 51bb4fe303..28696aa327 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()