mirror of
https://github.com/rust-lang/cargo
synced 2024-10-14 03:32:39 +00:00
b78f91831e
A comment on killercup/cargo-edit#15 had me worried that `cargo add` was deleting comments now. It appears that isn't the case for inline tables. Standard tables however do delete comments. The work to make sure they don't conflicts with another need. When changing the source, we delete the old source fields and append the new which can cause some formatting to be carried over unnecessarily. For example, what would normally look like ```toml cargo-list-test-fixture-dependency = { optional = true, path = "../dependency", version = "0.0.0" } ``` When fixed to preserve comments with my naive solution looks like ```toml cargo-list-test-fixture-dependency = { optional = true , path = "../dependency", version = "0.0.0" } ``` Note that `optional = true` used to be last, so space separating it and `}` was kept, now separating it and `,`. More work will be needed to get this into an ideal state but we can at least have confidence with inline tables for now. |
||
---|---|---|
.. | ||
in | ||
out | ||
mod.rs | ||
stderr.log | ||
stdout.log |