Skip to content

or_fun_call warns on enum variant construction. #917

Closed
@Stebalien

Description

@Stebalien

I have the following line in my project:

self.write_to_fmt(&mut Adapter(f)).or(Err(fmt::Error))

Err(fmt::Error) is a constant but clippy complains that I'm calling a function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions