### Problem Here is an example `Cargo.toml`, I will omit the `package` section from now on ```toml [package] name = "foo" version = "0.1.0" edition = "2021" [dependencies] rand = "*" serde = "*" [dependencies.cfg-if] version = "*" ``` When I run `cargo add libc`, I get ```toml [dependencies] rand = "*" serde = "*" libc = "0.2.139" [dependencies.cfg-if] version = "*" ``` instead of ```toml [dependencies] libc = "0.2.139" rand = "*" serde = "*" [dependencies.cfg-if] version = "*" ``` since `cfg-if` goes after `serde` and `cargo add` thinks the dependencies are unsorted ### Steps _No response_ ### Possible Solution(s) check the sorting of the `[dependencies]` section and the `[dependencies.*]` sections separately, the same applies for build and dev dependencies ### Notes _No response_ ### Version ```text cargo 1.68.0-nightly (d992ab4e9 2023-01-10) release: 1.68.0-nightly commit-hash: d992ab4e9034930e7809749f04077045af8f4d79 commit-date: 2023-01-10 host: x86_64-unknown-linux-gnu libgit2: 1.5.0 (sys:0.16.0 vendored) libcurl: 7.86.0-DEV (sys:0.4.59+curl-7.86.0 vendored ssl:OpenSSL/1.1.1q) os: NixOS 23.5.0 [64-bit] ``` ``` <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"hi-rustin"}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->