3 ms·
> In Rust 1.62.0 we introduced cargo add, a command line utility to add dependencies to your project. Now you can use cargo remove to remove dependencies. It's
by modernerd 4y ago
> In Rust 1.62.0 we introduced cargo add, a command line utility to add dependencies to your project. Now you can use cargo remove to remove dependencies.
It's only little but I love this addition.
- epage 4y agoReally grateful for the work cassaundra did to get this in! A part of the cargo-remove work that didn't make it into 1.66 is that cargo-remove will garbage collect references to the remove dependency. For example, if you remove the last reference to a `workspace.dependency`, it'll automatically remove the workspace entry for you! The original RFC for `workspace.dependency` declared having an unused entry an error but we didn't think it was worth the implementation cost / runtime overhead and now we can automatically clean it up!