fix: Fix project discovery not checking whether the Cargo.toml actually exists

This commit is contained in:
Lukas Wirth 2024-03-20 14:39:35 +01:00
parent 6fce1d71df
commit c7f02012b1

View File

@ -126,6 +126,7 @@ fn find_cargo_toml_in_child_dir(entities: ReadDir) -> Vec<ManifestPath> {
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()