When cargo scans for a workspace it simply walks up the directories until finding the first Cargo.toml with a [workspace] declaration. All crates are detected relative to this, and no special skipping behaviour (walking further up the directories) occurs when a package was not found (was previously happening in find_package()+member()).
Simplify the original code somewhat by making this feat more obvious, rejecting more invalid configurations.
When
cargo
scans for a workspace it simply walks up the directories until finding the firstCargo.toml
with a[workspace]
declaration. All crates are detected relative to this, and no special skipping behaviour (walking further up the directories) occurs when a package was not found (was previously happening infind_package()+member()
).Simplify the original code somewhat by making this feat more obvious, rejecting more invalid configurations.