Clippy · Correctness
clippy::panic_in_result_fn
A function that already returns Result should report the failure as Err instead of panicking.
- Category
- Correctness
- Default level
- warn
- Tier
- P2
- Producer
- Clippy
What it reads
Clippy, with the compiler behind it. The only pass that compiles.
Tier
Ordinary defect.
The tier bounds how severe a rule may be; its category bounds the tier.Change it
Turn it off, or make it blocking, without touching the code it flags:
rust-doctor --rule clippy::panic_in_result_fn=off .
rust-doctor --rule clippy::panic_in_result_fn=error .