Skip to content

Check always true comparison #347

@MKowalski8

Description

@MKowalski8

Problem

At the moment always true comparison like below, won't be linted.

fn main() {
    let condition = false;

    if !condition || condition {
        println!("Hello");
    }
}

Even though it is redundant.

Proposed Solution

It can be done as a part of:

impl Lint for RedundantComparison {

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog Lint

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions