Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't duplicate comments when editing TOML #13402

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Commits on Feb 5, 2024

  1. 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
    epage committed Feb 5, 2024
    Configuration menu
    Copy the full SHA
    12cf56a View commit details
    Browse the repository at this point in the history