Skip to content

Enhance option_as_ref_deref lint with the |x| &**x case #5367

Closed
@flip1995

Description

@flip1995

In #4945, the option_as_ref_deref lint was added. This lint should be enhanced, so that it also detects:

opt.as_ref().map(|x| &**x)

Originally posted by @Areredify in #4945 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesgood first issueThese issues are a good way to get started with Clippy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions