cargo cargo-sort 2.0.0
v2.0.0

latest releases: 2.1.4, 2.1.3, 2.1.2...
12 months ago

This release is a big one! Special thanks go out to @thomaseizinger who fixed a lot of regressions
from the initial toml_edit upgrade.
Thanks also to @ssrlive for contributing a bunch of improvements.

Highlights

  • Upgrade toml_edit to support more TOML syntax (in particular, something.workspace = true)
  • Format Cargo.toml files by default
    • Use -n or --no-format to disable this
    • --check mode also verifies formatting unless you pass the abovementioned flag
  • workspace.dependencies (and build- / dev- dependencies) are now also sorted
  • target.'cfg(something)'.dependencies now go right after dependencies
    • The same goes for target-specific dev-dependencies

Other Improvements

  • Remove unused dependencies
  • In non-check mode, report whether files were already sorted or not

Don't miss a new cargo-sort release

NewReleases is sending notifications on new releases.