cargo-sort
cargo-sort copied to clipboard
Reordering of sections doesn't add a new line between them
With Cargo.toml as
[dependencies]
amq-protocol = "6"
anyhow = "1"
bytes = "1"
diesel = { version = "1.4", features = ["postgres"] }
dotenv = "0.15.0"
lazy_static = "1"
regex = "1"
serde = "1"
tokio = {version="1", features=["net", "io-util", "rt", "macros", "rt-multi-thread"] }
[dev-dependencies]
celery = "0.4.0-rcn.11"
simplelog = "*"
[package]
edition = "2021"
name = "cavalcade"
version = "0.1.0"
and tomlfmt.toml as
table_order = ["package", "dependencies", "dev-dependencies"]
it gets reordered to
[package]
edition = "2021"
name = "cavalcade"
version = "0.1.0"
[dependencies]
amq-protocol = "6"
anyhow = "1"
bytes = "1"
diesel = { version = "1.4", features = ["postgres"] }
dotenv = "0.15.0"
lazy_static = "1"
regex = "1"
serde = "1"
tokio = { version = "1", features = ["net", "io-util", "rt", "macros", "rt-multi-thread"] }
[dev-dependencies]
celery = "0.4.0-rcn.11"
simplelog = "*"
Note the newline at the top of the file, and the lack of newline before dependencies
Fixing this manually is easy and the tool is happy after that, so thanks for making it though!
Thanks for catching this, it may be easy to fix but it should work :smile:
I'll look into it unless you are interested?
I'm unlikely to pick this up any time soon as I've got too many other things on my plate currently.