Skip to content

Uses visual style for long closure arguments #3865

Open
@joshtriplett

Description

@joshtriplett

rustfmt seems to use visual style rather than block style when reformatting long closure argument lists:

    let write_status = |status: &mut Vec<ansi_term::ANSIString>,
                        diff: &Diff,
                        heading: &str,
                        color: &Style,
                        show_hints: bool,
                        hints: &[&str]|
     -> Result<bool> {

One possible block-style alternative rustfmt could use:

    let write_status = |
        status: &mut Vec<ansi_term::ANSIString>,
        diff: &Diff,
        heading: &str,
        color: &Style,
        show_hints: bool,
        hints: &[&str]
    | -> Result<bool> {

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions