Skip to content

match indentation broken for tuple-closing brackets #6038

Open

Description

The following snippet is formatted using rustfmt.

match Some(1) {
    Some(number) => (
        "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        number,
    )
        .to_owned(),
    None => ("test", 0).to_owned(),
};

In my opinion, this is not very readable since it breaks the strict indentation of anything inside a match arm. Shouldn't the closing bracket of the tuple in the Some(_) arm be indented further (and therefore, potentially, the two fields of the tuple as well)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions