cargo-udeps icon indicating copy to clipboard operation
cargo-udeps copied to clipboard

Show unused dependencies that gets used transitively by other dependecies

Open WiSaGaN opened this issue 5 years ago • 2 comments

Currently, cargo +nightly udeps shows All deps seem to have been used. for below:

[dependencies]
chrono = "0.4"
time = "0.1"
fn main() {
    println!("{:?}", chrono::Local::now());
}

I expect it to show time dependency as unused since we can remove it from Cargo.toml. I am not sure whether this should be a bug issue or a feature request though.

Very useful tool by the way!

WiSaGaN avatar Dec 16 '20 07:12 WiSaGaN

Same thing here: in this repo (already merged) the foreign-types crate is directly unused, but openssl depends on that and the tool does not show that the dependency could be removed from Cargo.toml.

dodomorandi avatar Dec 31 '20 08:12 dodomorandi

I write a small tool for this. https://github.com/light4/cargo-inner

light4 avatar Mar 15 '22 06:03 light4