Skip to content

Arrays in inline tables break strangely #304

@maltekliemann

Description

@maltekliemann

The following inline table...

parity-scale-codec = { default-features = false, features = ["derive", "max-encoded-len"], version = "3.0.0" }

...breaks into:

parity-scale-codec = { default-features = false, features = [
  "derive",
  "max-encoded-len",
], version = "3.0.0" }

I'm not sure if this is expected behavior. I find this to be very difficult and confusing to read. Other auto-formatters (from other languages) that I'm familiar tend to do something like the following:

parity-scale-codec = {
    default-features = false,
    features = ["device", "max-encoded-len"],
    version = "3.0.0",
}

But I would be ok with just not breaking the array and keeping the line longer that it is normally allowed to be. So, depending on whether the current behavior is correct, I would very much appreciate either a fix or an option for preventing arrays in inline tables from being expanded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions