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 indentation after an array literal #450

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ANtlord
Copy link
Contributor

@ANtlord ANtlord commented Jul 25, 2021

Let's consider this case

fn walk() {
    let positions = [
        [0.0, 0.0, 0.0],
        [2.0, 5.0, -15.0],
        [-1.5, -2.2, -2.5],
        [-3.8, -2.0, -12.3],
    ];

        let speed = 123;
}

As you might see let speed = 123 stays in the wrong position because it's treated by cindent called in the end of the function. The patch makes it this way

fn walk() {
    let positions = [
        [0.0, 0.0, 0.0],
        [2.0, 5.0, -15.0],
        [-1.5, -2.2, -2.5],
        [-3.8, -2.0, -12.3],
    ];

    let speed = 123;
}

@rust-highfive
Copy link

r? @da-x

(rust-highfive has picked a reviewer for you, use r? to override)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants