Skip to content

Left floating chain call #566

Closed
Closed
@matklad

Description

@matklad

For my code, rustfmt applies this formatting:

let program = glium::Program::from_source(&display,
                                          &include_str!("./shaders/vertex.glsl"),
                                          &include_str!("./shaders/fragment.glsl"),
                                          None)
                  .unwrap();

This unwrap feels a little lonely :(

I don't know a way of formatting this really well, but this two options are somewhat better in my opinion

let program = glium::Program::from_source(
    &display,
    &include_str!("./shaders/vertex.glsl"),
    &include_str!("./shaders/fragment.glsl"),
    None
).unwrap();
let program = glium::Program::from_source(&display,
                                          &include_str!("./shaders/vertex.glsl"),
                                          &include_str!("./shaders/fragment.glsl"),
                                          None).unwrap();

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