Skip to content

feat: extension Merge match arms #20323

Description

@A4-Tacks

Add assist, Merge all match arms

Example

fn main() {
    let n = 2;
    $0match n {
        0 => 1,
        1 => 1,
        2 => 2,
        3 => 2,
        4 => 3,
        5 => 3,
        _ => 0,
    };
}

->

fn main() {
    let n = 2;
    match n {
        0 | 1 => 1,
        2 | 3 => 2,
        4 | 5 => 3,
        _ => 0,
    };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions