Skip to content

cargo-upgrade and single item tables #717

@Tosainu

Description

@Tosainu

cargo upgrade collapses a table-like item that has only one item. For example, if we upgrade Cargo.toml that has the following fragment:

[dependencies]
inline_table = { version = "0.1.0" }
string = "0.1.0"

[dependencies.table]
version = "0.1.0"

the result would be something like this.

[dependencies]
inline_table = "0.2.0"
string = "0.2.0"
table= "0.2.0"
  • The result for a dependency that is specified in the table has no space after the crate name.
    table= "0.2.0"
  • I'm not too sure about the advantage of collapsing tables. This potentially drops some information such as a comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions