est31 / cargo-udeps

Find unused dependencies in Cargo.toml
Other
1.76k stars 46 forks source link

Show unused dependencies that gets used transitively by other dependecies #84

Closed WiSaGaN closed 2 years ago

WiSaGaN commented 3 years ago

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!

dodomorandi commented 3 years ago

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.

light4 commented 2 years ago

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