Skip to content

Enhance/New Lint: option_and_then_some for the Result equivalent #5492

@flip1995

Description

@flip1995

It does not (yet) report anything for the Result equivalent:

fn main() {
    let a = Err::<(), _>("error");
    let b = a.or_else(|_| Err("another error"));
    println!("{:?}", b);
}

Originally posted by @shepmaster in #1459 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lintsC-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