TimonPost / cargo-unused-features

Find potential unused enabled feature flags and prune them.
MIT License
230 stars 10 forks source link

Only trigger workspace analysis if there are workspace members #23

Open bbannier opened 1 month ago

bbannier commented 1 month ago

We would previously trigger workspace analysis if a Cargo.toml had any workspace entry even though we ultimately cared about workspace.members. This caused empty reports for files which used workspace only for configuration like e.g., entries created by cargo-dist.

With this patch we handle a workspace only if workspace.members is present. We also simplify the code since we do not need to inject anymore wheter a project "uses" workspaces (i.e., has workspace members).

Closes #22.