How to use "cargo yank"?

Viewed 1194

I've published my crate and then realized that I've forgotten to include some small detail in my README.md. I've included that detail into README.md and did git commit and push. How to update my crate without having to change its version?

From the crates.io documentation:

cargo yank

Occasions may arise where you publish a version of a crate that actually ends up being broken for one reason or another (syntax error, forgot to include a file, etc.). For situations such as this, Cargo supports a yank of a version of a crate.

$ cargo yank --vers 1.0.1 

$ cargo yank --vers 1.0.1 --undo

I don't understand how to use it. Why 2 commands: one with another without --undo? Should I run them both? Or only one? Which?

Should I run crate package && crate publish after that? Or only cargo yank ...? Will that automatically update my crate?

1 Answers
Related