cargo-machete
cargo-machete copied to clipboard
False positives for multi-dep single `use` statements
Not sure if this is a known drawback of this crate, but my project has a rustfmt.toml that collapses all imports into one use/pub use
{}
block. This seems to cause all the crates to be returned as false positives.
pub use {async_trait, futures, reqwest};
cargo-machete found the following unused dependencies in /var/home/...
my_crate -- /var/home/ ... /Cargo.toml:
async_trait
futures
reqwest
Thanks for opening an issue; that looks like a real bug (in general, cargo-machete should give too many unused dependencies, not too few). Probably the regular expressions would need to be tweaked, if you feel like investigating that using the helper project, that could be fun and fixing that would be useful!