Skip to content

Move if_then_panic to pedantic #7718

Closed
@ghost

Description

I ran this lint on a bunch of crates and it's firing a lot.

For readability, it's debatable whether it's recommendations are actually improvements. Especially where there are a lot of args or the condition is complicated.

I also think there is a semantic difference between an assert and if-panic. I see asserts as checking "my code". I'd never use asserts to check user input. I'd like to know if other people share this view.

(There are also bugs in the recommendations but that's not relevant to this issue. I'll log a separate issue for those later.)

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