Skip to content

lint result.unwrap_or_else(|| value) #5715

@bugadani

Description

@bugadani

Most of the result.unwrap_or_else(|| <some value, or object property>) code can be replaced with result.unwrap_or(<some value>). This is mostly a readability issue and probably gives extra work to the inliner/optimizer similar to other redundant closures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions