Skip to content

Commit eb9f56f

Browse files
committed
fix: Don't duplicate comments when editing TOML
`toml_edit` <0.22 has a bug that will cause ```toml [lints] rust.unsafe_op_in_unsafe_fn = "deny" rust.explicit_outlives_requirements = "warn" clippy.cast_lossless = "warn" clippy.doc_markdown = "warn" clippy.exhaustive_enums = "warn" ``` to be written out as [lints] rust.unsafe_op_in_unsafe_fn = "deny" rust.explicit_outlives_requirements = "warn" clippy.cast_lossless = "warn" clippy.doc_markdown = "warn" clippy.exhaustive_enums = "warn" ``` when it is parsed and then saved. See toml-rs/toml#675 This affects any format-preserving edits we do, including: - `cargo add` - `cargo remove` - `cargo init` / `cargo new` editing the workspace
1 parent 9d3f4e4 commit eb9f56f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ tar = { version = "0.4.40", default-features = false }
9696
tempfile = "3.9.0"
9797
thiserror = "1.0.56"
9898
time = { version = "0.3", features = ["parsing", "formatting", "serde"] }
99-
toml = "0.8.9"
100-
toml_edit = { version = "0.21.1", features = ["serde"] }
99+
toml = "0.8.10"
100+
toml_edit = { version = "0.22.0", features = ["serde"] }
101101
tracing = "0.1.40" # be compatible with rustc_log: https://github.com/rust-lang/rust/blob/e51e98dde6a/compiler/rustc_log/Cargo.toml#L9
102102
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
103103
unicase = "2.7.0"

0 commit comments

Comments
 (0)